|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-06-06 23:59 UTC] colder@php.net
[2008-06-07 00:28 UTC] markus dot ast at hotmail dot de
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 08:00:01 2025 UTC |
Description: ------------ first: sry for my english (I am german) Trying to dynamicly declarate a class in a namespace doesnt works. It doesn't searches in the current namespace, if this class is present. It just searches in the global namespace. Reproduce code: --------------- <?php namespace Level1::Level2; class Example { public function __construct() { echo 'works!'; } } $classname = 'Example'; new $classname(); ?> Expected result: ---------------- Fatal error: Class 'Example' not found in test.php on line 11