#46979 [Bgs->Asn]: use with non-compound name *has* effect
| From: | felipe@php.net | Date: | Wed, 31 Dec 2008 14:05:51 +0000 |
| Subject: | #46979 [Bgs->Asn]: use with non-compound name *has* effect | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-132451@lists.php.net to get a copy of this message | ||
ID: 46979
Updated by: felipe@php.net
Reported By: ladislav at marek dot su
-Status: Bogus
+Status: Assigned
Bug Type: Scripting Engine problem
Operating System: irrelevant
PHP Version: 5.3.0alpha3
-Assigned To:
+Assigned To: cellog
Previous Comments:
------------------------------------------------------------------------
[2008-12-31 09:36:09] ladislav at marek dot su
Yes, but bug isn't fixed, 'use ArrayObject' is same as 'use
\ArrayObject' manual is wrong. Please consider importing non-compound
class or namespace names without \ prefix (remove invalid warning).
------------------------------------------------------------------------
[2008-12-30 23:49:09] felipe@php.net
Duplicated of Bug #46755
------------------------------------------------------------------------
[2008-12-30 23:38:25] ladislav at marek dot su
Description:
------------
Currently php throws bogus warning with non-compound name in use
statement.
Reproduce code:
---------------
namespace My;
use Foo;
new Foo\Bar;
Expected result:
----------------
Fatal error: Class 'Foo\Bar' not found in ...
Actual result:
--------------
Warning: The use statement with non-compound name 'Foo' has no effect
in ...
Fatal error: Class 'Foo\Bar' not found in ...
'use Foo' has effect, because fully qualified name isn't My\Foo\Bar but
Foo\Bar.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=46979&edit=1