ID: 37052 Updated by: [EMAIL PROTECTED] Reported By: rael at grad dot icmc dot usp dot br -Status: Open +Status: Bogus Bug Type: Class/Object related Operating System: Any PHP Version: 5.1.2 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 Late static binding is in consideration. Previous Comments: ------------------------------------------------------------------------ [2006-04-12 11:28:16] rael at grad dot icmc dot usp dot br Description: ------------ Parent class constants are not overriden by sub classes in static methods. Do this override is a common behave, like in Java language. This is a very important feature to construct good class hierarchies. Reproduce code: --------------- <?php class Father{ const NAME = "John"; public static function foo(){ echo self::NAME; } } class Son extends Father{ const NAME = "John Junior"; } Son::foo(); ?> Expected result: ---------------- Output of "John Junior" Actual result: -------------- Output of "John" ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=37052&edit=1