ID: 43719
Updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Irrelevant
PHP Version: 5.3CVS-2007-12-31 (CVS)
Assigned To: dmitry
New Comment:
use a;
This would use the class "a" as "a". The Warning tells you that this
statement has no effect.
or the second case:
It was a design decision that functions can't be "use"d, see a recent
post from Stas on internals on that.
Previous Comments:
------------------------------------------------------------------------
[2007-12-31 14:34:41] [EMAIL PROTECTED]
Description:
------------
[EMAIL PROTECTED] ~ % cat a.php
<?php
namespace a;
function b() {}
[EMAIL PROTECTED] ~ % cat b.php && php b.php
<?php
require 'a.php';
use a;
b();
Warning: The use statement with non-compound name 'a' has no effect in
/home/sb/b.php on line 4
Fatal error: Call to undefined function b() in /home/sb/b.php on line
5
[EMAIL PROTECTED] ~ % cat b.php && php b.php
<?php
require 'a.php';
use a::b;
b();
Fatal error: Call to undefined function b() in /home/sb/b.php on line 5
Expected result:
----------------
Not sure.
Actual result:
--------------
See above.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43719&edit=1