ID:               43608
 Updated by:       [EMAIL PROTECTED]
 Reported By:      mrbizkit at email dot it
-Status:           Open
+Status:           Bogus
 Bug Type:         Feature/Change Request
 Operating System: *
 PHP Version:      5.2.5
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

That's an feature implemented with PHP 5.3 called "Late Static
Binding", see: http://php.net/language.oop5.late-static-bindings


Previous Comments:
------------------------------------------------------------------------

[2007-12-16 18:26:48] mrbizkit at email dot it

Description:
------------
hi, i'm asking for a feature change about this function in static
methods and extended classes (please read the reproduce code)

the problem is:
i want to get the caller classname, not the classname where get_class()
is used

if you want to fix it [?]
for retrocompatibility issues you can use get_class(NULL[,true]); or a
new function

Reproduce code:
---------------
class theparent
{
     public static function test()
     {
          echo get_class() . "\n";
        //echo get_class(NULL,TRUE) . "\n"; [?]
     }
}
class pecl extends theparent{}
class pear extends theparent{}

pecl::test();
pear::test();

Expected result:
----------------
pecl
pear

Actual result:
--------------
theparent
theparent


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


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

Reply via email to