|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-07-24 09:25 UTC] jani@php.net
[2009-07-24 17:43 UTC] jani@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 05 10:00:01 2025 UTC |
Description: ------------ Theres a difference in namespace passing to an autoloader. That may cause several problems and it should be the same. Reproduce code: --------------- <?php function __autoload($value) { echo $value; } new \ns\className; $a = "\ns\className"; new $a; ?> Expected result: ---------------- Same passing of namespace to autoloader as new \ns\className -> ns\className and $a = "\ns\className"; new $a; -> ns\className Actual result: -------------- new \ns\className -> autoloader gets ns\className $a = "\ns\className"; new $a; -> autoloader gets \ns\className (the first backslash is the problem)