3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { public function __constructor() { $this = & new b(); } } class b { } $class = new a(); var_dump(get_class($class));
Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.26
Deprecated: Assigning the return value of new by reference is deprecated in /in/eEGJ8 on line 7 Fatal error: Cannot re-assign $this in /in/eEGJ8 on line 7
Process exited with code 255.

preferences:
182.93 ms | 1395 KiB | 63 Q