ID: 34390 Updated by: [EMAIL PROTECTED] Reported By: cbelin at free dot fr -Status: Assigned +Status: Open -Bug Type: Class/Object related +Bug Type: Documentation problem Operating System: Windows XP SP2 PHP Version: 5.0.4 Assigned To: sniper New Comment:
Reclassified as docu bug. Previous Comments: ------------------------------------------------------------------------ [2005-09-12 11:37:54] [EMAIL PROTECTED] This is documentation bug. ------------------------------------------------------------------------ [2005-09-07 11:54:31] [EMAIL PROTECTED] Dmitry, shouldn't this procude an error..? ------------------------------------------------------------------------ [2005-09-06 13:49:50] cbelin at free dot fr Description: ------------ Manual says that static members and methods cannot be redefined in subclasses. It seems that it's not completely true (at least with PHP 5.0.4 under Windows XP), as redefining static methods in subclasses is allowed, and works fine (i.e. without triggering errors even if error level includes E_STRICT). Reproduce code: --------------- class Base { public static function foo() { return 'Foo...'; } } class Extended extends Base { public static function foo() { return 'Bar !!!'; } } echo Extended::foo(); Expected result: ---------------- An error, or the output of Base::foo() Actual result: -------------- It works, and prints 'Bar !!!' ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=34390&edit=1