Edit report at http://bugs.php.net/bug.php?id=53565&edit=1
ID: 53565 Updated by: [email protected] Reported by: updates at mail dot ru Summary: OOP last state binding bug in get_called_class() -Status: Open +Status: Bogus Type: Bug Package: Scripting Engine problem Operating System: Linux 2.6.34-r1 PHP Version: 5.3.4 Block user comment: N Private report: N 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 Please read http://php.net/lsb Previous Comments: ------------------------------------------------------------------------ [2010-12-17 21:27:45] updates at mail dot ru This line does not affect the bug: $a = get_class($this); It can be removed. ------------------------------------------------------------------------ [2010-12-17 21:22:02] updates at mail dot ru Description: ------------ Bug in get_called_class() Test script: --------------- class a { function __construct() { $a = get_class($this); a::test(); } function test() { var_dump(get_called_class()); } } class b extends a { } $a = new a(); $b = new b(); Expected result: ---------------- string(1) "a" string(1) "a" Actual result: -------------- string(1) "a" string(1) "b" ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=53565&edit=1
