|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-11-12 12:52 UTC] daverandom@php.net
-Status: Open
+Status: Not a bug
[2014-11-12 12:52 UTC] daverandom@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 14:00:01 2025 UTC |
Description: ------------ If I have a namespace and call new \NumberFormatter(...) inside the namespace I get Fatal error: Class 'x\NumberFormatter' not found in /home/thomas/test.php on line 7 If I add use \NumberFormatter; it works. BTW: I found this error in a class method. The reproducing script does not use classes. Test script: --------------- <?php namespace x; # use \NumberFormatter; $nf = new \NumberFormatter( 'de_DE', NumberFormatter::PATTERN_DECIMAL ); var_dump( $nf ); Expected result: ---------------- object(NumberFormatter)#1 (0) { } Actual result: -------------- Fatal error: Class 'x\NumberFormatter' not found in /home/thomas/test.php on line 7