Namespace problem?
| From: | Stefan Priebsch | Date: | Tue, 15 Jul 2008 16:08:10 +0000 |
| Subject: | Namespace problem? | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-38982@lists.php.net to get a copy of this message | ||
Hi list,
I was playing around with namespaces and stumbled across this:
#!/home/steve/php5.3-200807070430/sapi/cli/php
<?php
namespace Foo;
use Foo::Bar as Something;
class Bar { }
?>
works fine, whereas
#!/home/steve/php5.3-200807070430/sapi/cli/php
<?php
namespace Foo;
{
use Foo::Bar as Something;
class Bar { }
}
?>
yields: Parse error: syntax error, unexpected T_USE
in /home/steve/namespaces/code/with_braces.php on line 6
Regards,
Stefan
--
>e-novative> - We make IT work for you.
http://www.e-novative.de
e-novative GmbH - Poignring 24 - 82515 Wolfratshausen - Germany
tel/phone +49 (0)8171 267 087 0 - fax +49 (0)8171 267 087 5
Handelsregister/Trade Register: Amtsgericht München HRB 139407
Sitz/Registered Office: Wolfratshausen
Geschäftsführer/Executive: Dipl. Inform. Stefan Priebsch
GnuPG Key: 0x7DB67F7F