php-windows Digest 10 Mar 2009 17:42:50 -0000 Issue 3585 Topics (messages 29203 through 29203):
php 5.3 namespace issue ... 29203 by: Eric Lee Administrivia: To subscribe to the digest, e-mail: php-windows-digest-subscr...@lists.php.net To unsubscribe from the digest, e-mail: php-windows-digest-unsubscr...@lists.php.net To post to the list, e-mail: php-wind...@lists.php.net ----------------------------------------------------------------------
--- Begin Message ---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
--- End Message ---