php 5.3 namespace issue ...

php 5.3 namespace issue ...

am 10.03.2009 18:42:48 von Eric Lee

------=_NextPart_000_000B_01C9A1EA.AEF54AA0
Content-Type: text/plain;
charset="utf-8"
Content-Transfer-Encoding: quoted-printable

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

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 =3D new namespace\Another; // instantiates object of class =
foo\Another
$obj =3D new Another; // instantiates object of class My\Full\Classname
NSname\subns\func(); // calls function My\Full\NSname\subns\func
$a =3D new ArrayObject(array(1)); // instantiates object of class =
ArrayObject
// without the "use \ArrayObject" we would instantiate an object of =
class foo\ArrayObject
?>=20

---
here is my code

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
------=_NextPart_000_000B_01C9A1EA.AEF54AA0--