Edit report at https://bugs.php.net/bug.php?id=60022&edit=1

 ID:                 60022
 Patch added by:     [email protected]
 Reported by:        [email protected]
 Summary:            "use statement [...] has no effect" depends on
                     leading backslash
 Status:             Open
 Type:               Bug
 Package:            Scripting Engine problem
 PHP Version:        5.4.0beta1
 Block user comment: N
 Private report:     N

 New Comment:

The following patch has been added/updated:

Patch Name: patch.txt
Revision:   1318323848
URL:        
https://bugs.php.net/patch-display.php?bug=60022&patch=patch.txt&revision=1318323848


Previous Comments:
------------------------------------------------------------------------
[2011-10-09 17:27:35] [email protected]

Description:
------------
The "The use statement with non-compound name '%s' has no effect" warning is 
only thrown when the use statement doesn't have a leading backslash. It should 
be thrown in both cases as they are semantically equivalent.

(Patch is trivial: Get rid of the is_global arg altogether.)

Test script:
---------------
<?php
namespace {
    use Exception;
}
namespace {
    use \Exception;
}

// http://codepad.viper-7.com/vN34cx

Expected result:
----------------
Two warnings.

Actual result:
--------------
One warning.


------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=60022&edit=1

Reply via email to