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

 ID:                 60367
 Comment by:         david at orlandophp dot org
 Reported by:        woody dot gilk at kohanaframework dot org
 Summary:            Reflection and Late Static Binding
 Status:             Closed
 Type:               Bug
 Package:            Scripting Engine problem
 Operating System:   OSX 10.6.8
 PHP Version:        5.3.8
 Assigned To:        laruence
 Block user comment: N
 Private report:     N

 New Comment:

Any chance this will be back-ported to older versions of PHP? This bug affects 
the Reflection API in all versions of PHP from 5.3 to 5.3.8, which is widely 
distributed. A patch release would be appreciated.


Previous Comments:
------------------------------------------------------------------------
[2012-07-24 23:38:29] ras...@php.net

Automatic comment on behalf of laruence
Revision: 
http://git.php.net/?p=php-src.git;a=commit;h=e0137255164d3eb544efd9737ebb5f76477e7f33
Log: Fixed bug #60367 (Reflection and Late Static Binding)

------------------------------------------------------------------------
[2012-04-18 09:47:22] larue...@php.net

Automatic comment on behalf of laruence
Revision: 
http://git.php.net/?p=php-src.git;a=commit;h=e0137255164d3eb544efd9737ebb5f76477e7f33
Log: Fixed bug #60367 (Reflection and Late Static Binding)

------------------------------------------------------------------------
[2011-11-24 09:18:10] larue...@php.net

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.



------------------------------------------------------------------------
[2011-11-24 09:15:59] larue...@php.net

Automatic comment from SVN on behalf of laruence
Revision: http://svn.php.net/viewvc/?view=revision&revision=319745
Log: Fixed bug #60367 (Reflection and Late Static Binding)

------------------------------------------------------------------------
[2011-11-23 16:57:44] woody dot gilk at kohanaframework dot org

Description:
------------
When calling a method that exists only in the parent class with Reflection, the 
incorrect class is used.

This bug is highly related to #53742, but has a different test case. The root 
cause may be exactly the same.

Test script:
---------------
abstract class A {

        const WHAT = 'wrong';

        public static function call() {
                echo static::WHAT;
        }

}

class B extends A {

        const WHAT = 'correct';

}

B::call();

$class = new ReflectionClass('B');
$class->getMethod('call')->invoke(null);


Expected result:
----------------
"correct"

Actual result:
--------------
"wrong"


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



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

Reply via email to