Re: [PHP-DEV] Enhanced __CLASS__ constant

2009-01-25 Thread Lukas Kahwe Smith
On 21.01.2009, at 22:05, David Grudl wrote: Especially in namespaced code it should be very useful to have "something" returning fully qualified name as string. It can be operator, but I think introducing new keyword is bad way, or it can be realized using well known magic constant in new

Re: [PHP-DEV] Enhanced __CLASS__ constant

2009-01-22 Thread Stan Vassilev | FM
Why not just enhance get_class() function to accept the object itself (not only the instance)? This means: - No new keyword - No magic Foo::__MIRACLEHERE__ - No 50 pages documentation to help user Hi, You can't do this. get_class(SomeClass) would attempt to pass constant named SomeClass t

Re: [PHP-DEV] Enhanced __CLASS__ constant

2009-01-22 Thread Guilherme Blanco
Why not just enhance get_class() function to accept the object itself (not only the instance)? This means: - No new keyword - No magic Foo::__MIRACLEHERE__ - No 50 pages documentation to help user Regards, On Thu, Jan 22, 2009 at 5:24 AM, Stan Vassilev | FM wrote: > > >> Especially in namespace

Re: [PHP-DEV] Enhanced __CLASS__ constant

2009-01-21 Thread Stan Vassilev | FM
Especially in namespaced code it should be very useful to have "something" returning fully qualified name as string. It can be operator, but I think introducing new keyword is bad way, or it can be realized using well known magic constant in new context: Example: function factory($class)

Re: [PHP-DEV] Enhanced __CLASS__ constant

2009-01-21 Thread Kenan R Sulayman
Hey! First of all: the idea is very good. Criticism: Again, that's a new Syntax "feature"; May we deploy this into next releases of PHP? Thanks! -- (c) Kenan Sulayman Freelance Designer and Programmer Life's Live Poetry 2009/1/21 David Grudl > Especially in namespaced code it should be very