3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = array(1, 2, 3, 4); print_r($a); foreach($a as &$b) { print_r(&$b); } print_r($a); foreach($a as $b) { } print_r($a);
based on pZ9SY
Output for 7.0.0 - 7.0.2
Parse error: syntax error, unexpected '&' in /in/LBetr on line 5
Process exited with code 255.
Output for 5.4.11 - 5.6.17
Fatal error: Call-time pass-by-reference has been removed in /in/LBetr on line 5
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Deprecated: Call-time pass-by-reference has been deprecated in /in/LBetr on line 5 Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 ) 1234Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 ) Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 3 )