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='test0'); var_dump($bar); foo($foo='test1'); var_dump($foo);
Output for 7.0.0 - 7.1.0
string(5) "test0" string(5) "test0" Notice: Only variables should be passed by reference in /in/edq3S on line 8 string(5) "test1" string(5) "test1"
Output for 5.1.2 - 5.6.28
string(5) "test0" string(5) "test0" Strict Standards: Only variables should be passed by reference in /in/edq3S on line 8 string(5) "test1" string(5) "test1"
Output for 4.3.0 - 5.1.1
string(5) "test0" string(5) "test0" string(5) "test1" string(5) "test1"