php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48800 autoload does not strip leading T_NS_SEPARATOR
Submitted: 2009-07-05 05:18 UTC Modified: 2009-07-05 05:20 UTC
From: greg at chiaraquartet dot net Assigned: dmitry (profile)
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.3.0 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
29 - 19 = ?
Subscribe to this entry?

 
 [2009-07-05 05:18 UTC] 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;



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-07-05 05:20 UTC] cellog@php.net
several problems between operator and keyboard
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 21 22:01:32 2024 UTC