Hi, All,
I'm Eric
Recently I downloaded php 5.3 snapshot and continues to update to lastest
version.
I found an issue with namespace that won't work with few lastest snapshot.
This is code sample copied from php manual - Using namespaces : Aliasing and
Importing
<?php
namespace foo;
use My\Full\Classname as Another;
// this is the same as use My\Full\NSname as NSname
use My\Full\NSname;
// importing a global class
use \ArrayObject;
$obj = new namespace\Another; // instantiates object of class foo\Another
$obj = new Another; // instantiates object of class My\Full\Classname
NSname\subns\func(); // calls function My\Full\NSname\subns\func
$a = new ArrayObject(array(1)); // instantiates object of class ArrayObject
// without the "use \ArrayObject" we would instantiate an object of class
foo\ArrayObject
?>
---
here is my code
<?php
namespace {
class Q {}
}
namespace my\lib {
class Q {}
}
using \Q;
Fatal error: Cannot use POP as PP because the name is already in use in
E:\var\php53\index.php on line 110
Thanks,
----------------------------------------------------
Eric Lee