What is the reason the following code works and generates the given result. Is it a special language construct that is just supported by PHP? If so, then which one? Or is it just a simple php-ism?
class Foo {};
$a = new Foo();
$b = new $a();
var_dump($a); // class Foo#1 (0)
var_dump($b); // class Foo#2 (0)