#46974 [NEW]: Closure and Namespaces bug! FATAL ERROR

From: Date: Tue, 30 Dec 2008 16:40:22 +0000
Subject: #46974 [NEW]: Closure and Namespaces bug! FATAL ERROR
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-132413@lists.php.net to get a copy of this message
From: info at netmosfera dot it Operating system: irrelevant PHP version: 5.3.0alpha3 PHP Bug Type: Scripting Engine problem Bug description: Closure and Namespaces bug! FATAL ERROR Description: ------------ hi, i noticed there is a bug that causes a FATAL ERROR please read the code thank you for your time Reproduce code: --------------- file index.php: <?php namespace Clsure; spl_autoload_register(function($c){ echo $c = str_replace("\\", "-", $c) . ".php"; require($c); }); // TRY TO UNCOMMENT THIS LINE: // $b=function(){}; $a = new Testing(); ?> file Clsure-Testing.php: <?php namespace Clsure; class Testing{function __construct(){echo "constructor";}} ?> Actual result: -------------- Fatal error: Class 'Clsure\Testing' not found in on line 12 -- Edit bug report at http://bugs.php.net/?id=46974&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46974&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46974&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46974&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46974&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=46974&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=46974&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46974&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=46974&r=needscript Try newer version: http://bugs.php.net/fix.php?id=46974&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46974&r=support Expected behavior: http://bugs.php.net/fix.php?id=46974&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46974&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46974&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46974&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46974&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46974&r=dst IIS Stability: http://bugs.php.net/fix.php?id=46974&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46974&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46974&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46974&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=46974&r=mysqlcfg

« previous php.bugs (#132413) next »