3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function foo(&$x) {var_dump($x);} function bar($x){var_dump($x);} bar($bar='test'); var_dump($bar); foo($foo='test'); var_dump($foo);
Output for 7.0.0 - 7.1.0
string(4) "test" string(4) "test" Notice: Only variables should be passed by reference in /in/qeVMQ on line 8 string(4) "test" string(4) "test"
Output for 5.1.2 - 5.6.28
string(4) "test" string(4) "test" Strict Standards: Only variables should be passed by reference in /in/qeVMQ on line 8 string(4) "test" string(4) "test"
Output for 4.3.0 - 5.1.1
string(4) "test" string(4) "test" string(4) "test" string(4) "test"