Edit report at https://bugs.php.net/bug.php?id=61602&edit=1

 ID:                 61602
 Updated by:         sebast...@php.net
 Reported by:        sebast...@php.net
 Summary:            Allow access to name of constant used as default
                     value
-Status:             Open
+Status:             Closed
 Type:               Feature/Change Request
 Package:            Reflection related
 Operating System:   Irrelevant
 PHP Version:        5.4Git-2012-04-02 (Git)
-Assigned To:        
+Assigned To:        sebastian
 Block user comment: N
 Private report:     N

 New Comment:

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------
[2012-05-15 07:11:29] sebast...@php.net

Updated example script that uses new method names:

➜  ~  cat test.php 
<?php
class Foo {
    const bar = '...';

    public function baz($bar = self::bar) {
    }
}

$m = new ReflectionMethod('Foo', 'baz');
$p = $m->getParameters();

foreach ($p as $_p) {
    var_dump($_p->isDefaultValueConstant());

    if ($_p->isDefaultValueConstant()) {
        var_dump($_p->getDefaultValueConstantName());
    }
}

➜  ~  php test.php 
bool(true)
string(9) "self::bar"

------------------------------------------------------------------------
[2012-04-25 06:10:22] sebast...@php.net

Can we at least merge the patch into master? Once it's there we can think about 
merging it into PHP 5.4 for PHP 5.4.2.

------------------------------------------------------------------------
[2012-04-08 00:45:21] s...@php.net

Not very likely for 5.4.1, doesn't seem to be a critical bug. For 5.4.2, maybe.

------------------------------------------------------------------------
[2012-04-03 09:22:42] sebast...@php.net

Any chance this pull request will be merged into PHP 5.4.1? Thanks.

------------------------------------------------------------------------
[2012-04-03 06:07:04] reeze dot xia at gmail dot com

PS:

@pierrick pull request is here https://github.com/php/php-src/pull/35.

thanks.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=61602


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=61602&edit=1

Reply via email to