From:             
Operating system: Linux
PHP version:      5.3.2
Package:          Reproducible crash
Bug Type:         Bug
Bug description:Subclassing a class in a namespace doesn’t allow overloading 
functions

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 bug report at http://bugs.php.net/bug.php?id=52095&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=52095&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=52095&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=52095&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=52095&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=52095&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=52095&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=52095&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=52095&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=52095&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=52095&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=52095&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=52095&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=52095&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=52095&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=52095&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=52095&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=52095&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=52095&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=52095&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=52095&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=52095&r=mysqlcfg

Reply via email to