3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Esempio { var $variable; } function ciao($a) { $a->variable = 5; } $obj =& new Esempio; $obj->variable = 2; ciao($obj); var_dump($obj);
based on ZWoMM
Output for 7.0.0
Parse error: syntax error, unexpected 'new' (T_NEW) in /in/WLjl7 on line 13
Process exited with code 255.
Output for 5.3.20 - 5.6.28
Deprecated: Assigning the return value of new by reference is deprecated in /in/WLjl7 on line 13 object(Esempio)#1 (1) { ["variable"]=> int(5) }