3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($string) { $string = 'bar'; } $a = 'foo'; test(&$a); echo $a; // print bar print_r(error_get_last());
Output for 5.4.0 - 5.4.16
Fatal error: Call-time pass-by-reference has been removed; If you would like to pass argument by reference, modify the declaration of test(). in /in/kcogk on line 8
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 test(). 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/kcogk on line 8 barArray ( [type] => 8192 [message] => Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of test(). 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 [file] => /in/kcogk [line] => 8 )

preferences:
195.8 ms | 1387 KiB | 54 Q