#48800 [Opn->Bgs]: autoload does not strip leading T_NS_SEPARATOR
| From: | cellog@php.net | Date: | Sun, 05 Jul 2009 05:20:00 +0000 |
| Subject: | #48800 [Opn->Bgs]: autoload does not strip leading T_NS_SEPARATOR | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-139269@lists.php.net to get a copy of this message | ||
ID: 48800
Updated by: cellog@php.net
Reported By: greg at chiaraquartet dot net
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
PHP Version: 5.3.0
Assigned To: dmitry
New Comment:
several problems between operator and keyboard
Previous Comments:
------------------------------------------------------------------------
[2009-07-05 05:18:34] greg at chiaraquartet dot net
Description:
------------
If attempts to instantiate \class\name and class\name are made,
autoload is called twice.
Reproduce code:
---------------
<?php
namespace foo;
function __autoload($class)
{
var_dump($class);
eval('namespace ' . $GLOBALS['ns'] . ';class ' .
$GLOBALS['class'] .
'{}');
}
spl_autoload_register('foo\__autoload');
$ns = 'test';
$class = 'this';
class_exists('\test\this', true);
$a = new \test\this;
$a = new test\this;
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48800&edit=1