php 5.3 namespace issue ...

------=_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

<?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 =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
?>

---
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
------=_NextPart_000_000B_01C9A1EA.AEF54AA0--
Eric Lee [ Di, 10 März 2009 18:42 ] [ ID #1992839 ]
PHP » gmane.comp.php.windows » php 5.3 namespace issue ...

Vorheriges Thema: Using php5ts.lib in 5.3.0beta2-dev snapshot
Nächstes Thema: Mysql and Textarea (Please help me figure out this problem. I' m stuck. Please help me!!! )