3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php error_reporting(-1); function obj() { return (object) array(); } function foo(&$v) { var_dump($v); } foo(obj());
based on 0b5Wb
Output for 7.0.0 - 7.2.0
Notice: Only variables should be passed by reference in /in/LItEB on line 7 object(stdClass)#1 (0) { }
Output for 5.1.0 - 5.6.28
Strict Standards: Only variables should be passed by reference in /in/LItEB on line 7 object(stdClass)#1 (0) { }
Output for 5.0.5
Fatal error: Only variables can be passed by reference in /in/LItEB on line 7
Process exited with code 255.
Output for 5.0.0 - 5.0.4
object(stdClass)#1 (0) { }
Output for 4.3.0 - 4.4.9
object(stdClass)(0) { }