3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function foo($f) { $f+=1; } function bar(&$b) { $f+=1; } $a = 1;foo($a);echo "$a\n"; $b = 1;foo(&$b);echo "$b\n"; $c = 1;bar($c);echo "$c\n"; $d = 1;bar(&$d); echo "$d\n";
Output for 5.4.0 - 5.4.17
Fatal error: Call-time pass-by-reference has been removed; If you would like to pass argument by reference, modify the declaration of foo(). in /in/PR0g4 on line 11
Process exited with code 255.
Output for 5.3.0 - 5.3.29
Deprecated: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of foo(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /in/PR0g4 on line 11 Deprecated: Call-time pass-by-reference has been deprecated in /in/PR0g4 on line 13 1 2 Notice: Undefined variable: f in /in/PR0g4 on line 7 1 Notice: Undefined variable: f in /in/PR0g4 on line 7 1