3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foobar { public $id = 0; } $foobar = new Foobar(); $foobar2 = &new Foobar(); $foobar3 = & new Foobar(); $foobar4 =& new Foobar();
based on qh12G
Output for 7.0.0 - 7.1.7
Parse error: syntax error, unexpected 'new' (T_NEW) in /in/K03n9 on line 9
Process exited with code 255.
Output for hhvm-3.15.4
Output for 5.6.0 - 5.6.30
Deprecated: Assigning the return value of new by reference is deprecated in /in/K03n9 on line 9 Deprecated: Assigning the return value of new by reference is deprecated in /in/K03n9 on line 10 Deprecated: Assigning the return value of new by reference is deprecated in /in/K03n9 on line 11