ID:               46974
 Comment by:       info at netmosfera dot it
 Reported By:      info at netmosfera dot it
 Status:           Open
 Bug Type:         Scripting Engine problem
 Operating System: irrelevant
 PHP Version:      5.3.0alpha3
 New Comment:

uhm... autoload is not called!

another suggest:
Closure is a special class\type

so it must be global
in a namespace i have to use

public function method(\Closure $x){}

instead of

public function method(Closure $x){}

is it correct? Closure is a special type and final too


Previous Comments:
------------------------------------------------------------------------

[2008-12-30 16:40:22] info at netmosfera dot it

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 this bug report at http://bugs.php.net/?id=46974&edit=1

Reply via email to