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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: greg at chiaraquartet dot net
New email:
PHP Version: OS:

 

 [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

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-07-05 05:20 UTC] cellog@php.net
several problems between operator and keyboard
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 17 01:01:33 2025 UTC