3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($a) { $a++; } $test = 1; foo(&$test); var_dump($test);
Output for 5.4.0 - 5.4.12, 5.4.14
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 jPmB2 on line 8
Process exited with code 255.
Output for 5.4.13
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/k1Q9m on line 8
Process exited with code 255.
Output for 5.3.28 - 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/jPmB2 on line 8 int(2)
Output for 5.3.23, 5.3.25 - 5.3.27
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/k1Q9m on line 8 int(2)
Output for 5.3.0 - 5.3.22, 5.3.24
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 jPmB2 on line 8 int(2)

preferences:
172.75 ms | 1395 KiB | 52 Q