ID:               35266
 Updated by:       [EMAIL PROTECTED]
 Reported By:      markus at cultcom dot de
-Status:           Open
+Status:           Wont fix
 Bug Type:         Feature/Change Request
 Operating System: Linux (Fedora Core 4)
 PHP Version:      5.0.5
 New Comment:

__CLASS__ is replaced with it's value during compile time.
Also, I would consider it's right, because this method actually belong
to the parent class, not to the derived one.


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

[2005-11-17 17:52:51] markus at cultcom dot de

Description:
------------
__CLASS__ does not contain the correct class name in a generic class if
method is called from a derived class.

Reproduce code:
---------------
<?php

class Generic
{
    public static function i_am()
    {
        print __CLASS__ . "\n";
    }
}

class Derived extends Generic
{
}

Generic::i_am();   // correct, print "Generic"
Derived::i_am();   // wrong, should print "Derived"

?>

Expected result:
----------------
If I call a method which was implemented in a parent class I need in
any way access to the name of the class which actually was asked to
execute the method...


Actual result:
--------------
Always the name of the class that actualy implements the method.


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


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

Reply via email to