ID: 37052 User updated by: rael at grad dot icmc dot usp dot br Reported By: rael at grad dot icmc dot usp dot br -Status: Bogus +Status: Open -Bug Type: Class/Object related +Bug Type: Feature/Change Request Operating System: Any PHP Version: 5.1.2 New Comment:
Changed to Feature/Change Request. Previous Comments: ------------------------------------------------------------------------ [2006-04-12 11:54:06] [EMAIL PROTECTED] 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. ------------------------------------------------------------------------ [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