3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo {} $d = & new Foo(); echo get_class($d);
Output for 7.0.0 - 7.0.2
Parse error: syntax error, unexpected 'new' (T_NEW) in /in/Ftc9A on line 5
Process exited with code 255.
Output for 5.5.24 - 5.5.35, 5.6.8 - 5.6.28
Deprecated: Assigning the return value of new by reference is deprecated in /in/Ftc9A on line 5 Foo

preferences:
172.91 ms | 1395 KiB | 37 Q