3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php error_reporting(~0); function foo(&$a) {} function bar() { return 1; } function &baz() { $a = 1; return $a; } echo "bar\n"; foo(bar()); // STRICT echo "baz\n"; foo(baz()); // Not strict echo "scalar\n"; foo(1);
Output for 5.3.0 - 5.4.31
Fatal error: Only variables can be passed by reference in /in/lPf5b on line 13
Process exited with code 255.