On Mon, 2008-10-27 at 17:53 +0100, Hannes Magnusson wrote:
> On Mon, Oct 27, 2008 at 16:50, Ólafur Waage <[EMAIL PROTECTED]> wrote:
> > I found that he had one valid question that i would like to see answered.
> >
> >> is the below allowed ?
> >>
> >> $bar = new Module \ Foo \ Bar();
> >>
> >> I find it easier to read than with out the space.
> >
> > Since it looks pretty good with the spaces there.
>
> I don't see why it wouldn't be allowed. You can already do
> function_name (), or classname :: methodname
> ().
> This isn't python, the parser doesn't really care about the spaces :)
It might work in some places, not always, consider
<?php
$class = '\ foo \ bar \ baz';
new $class();
?>
as the name is stored without spaces in the class table, not sure
whether it's worth parsing whitespaces in such cases...
johannes
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php