Re: alpha2 scheduled

From: Date: Mon, 27 Oct 2008 17:28:20 +0000
Subject: Re: alpha2 scheduled
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.internals 
Request: Send a blank email to internals+get-41471@lists.php.net to get a copy of this message
On Mon, 2008-10-27 at 17:53 +0100, Hannes Magnusson wrote: > On Mon, Oct 27, 2008 at 16:50, Ólafur Waage <olafurw@gmail.com> 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

« previous php.internals (#41471) next »