Larry Garfield wrote:
> Greg: You say that the old java-package-style definition still works, in
> addition to braces. I presume then that the following are equivalent:
>
> <?php
> namespace foo;
>
> class Bar {
> ...
> }
> ?>
>
> <?php
> namespace foo {
> class Bar {
> ...
> }
> }
> ?>
>
> What happens if you mix them?
>
> <?php
> namespace baz;
>
> namespace foo {
> class Bar {
> ...
> }
> }
> ?>
compiler error - if you use namespace OneToRuleThemAll; then you can't
additionally use namespace another {}
> Would the compiler have a heart attack if someone did:
>
> <?php
> namespace foo {
> namespace baz {
> class Bar { ... }
> }
> }
> ?>
compiler error
Greg
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php