Edit report at http://bugs.php.net/bug.php?id=52095&edit=1
ID: 52095 Updated by: fel...@php.net Reported by: samu dot voutilainen at gmail dot com Summary: Subclassing a class in a namespace doesnât allow overloading functions -Status: Open +Status: Feedback Type: Bug Package: Reproducible crash Operating System: Linux PHP Version: 5.3.2 New Comment: Please try using this snapshot: http://snaps.php.net/php5.3-latest.tar.gz For Windows: http://windows.php.net/snapshots/ I just got this message: Strict Standards: Declaration of bar\B::meh() should be compatible with that of foo\A::meh() Previous Comments: ------------------------------------------------------------------------ [2010-06-16 15:16:37] samu dot voutilainen at gmail dot com Description: ------------ Code below demonstrates how to produce the bug. I get to error log a very obscure error: [Wed Jun 16 15:50:26 2010] [error] [client 127.0.0.1] PHP Fatal error: Class 'slm\\util\\Logger' not found in [..]/a.php on line 160 As a note, there is no call to Logger in this class. Test script: --------------- namespace foo { class A { public function meh($is = true) { } } } namespace bar { class B extends /foo/A { public function meh() {} } } Expected result: ---------------- B::meh() to override A::meh() Actual result: -------------- No output and very strange error to the system log: [Wed Jun 16 15:50:26 2010] [error] [client 127.0.0.1] PHP Fatal error: Class 'slm\\util\\Logger' not found in [..]/a.php on line 160 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=52095&edit=1