Re: [PHP-DEV] RFC: about class names as values

2011-01-07 Thread Martin Scotta
Hi all, I've wrote a simple snippet to show the importance of this feature. This little piece of code, at a glance, tries to instantiate 2 same objects by different ways, but fails because of a silently code bug. -- start of code test(); $class = 'B\C\Foo'; $f2 = new $class; $f2->tes

Re: [PHP-DEV] RFC: about class names as values

2011-01-07 Thread Adi Nita
Hi, To proper support this we'd have to make classes first class elements. > For making this consistent it would make sense to make functions first > class elements. And best drop the $ in front of variables and create a > new language. Everything else becomes a mess. > Closures are first-class c