Greg Beaver wrote:
>
> <?php
> namespace foo\classes;
> use sneaky\devil as foo;
>
> class buh extends foo\stuff {}
> \\ this extends sneaky\devil\stuff. oops... should have used \foo\stuff
> ?>
accualy I have a question about this if i may: why doesn't the use statement
fall under the same resolution rules as general code? that is why foo isn't
foo\classses\sneaky\devil?
personally i'd find this much more consistent if *anything* below namespace
declaration was relative to it. and i could always use absolute declaration
explicitly if i'd require it:
<?php
namespace foo;
use bar as A; /// ->resolves as A == \foo\bar
use \bar as B; /// ->resolves as B == \bar
?>
TIA
m.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php