3v4l.org

run code in 300+ PHP versions simultaneously
<?php $newArray = array(); foreach($var in $oldArray){ $newArray[] = $var; }
Output for 8.0.0 - 8.0.8, 8.1.1
Parse error: syntax error, unexpected identifier "in" in /in/0vmXZ on line 4
Process exited with code 255.
Output for 7.3.0 - 7.3.29, 7.4.0 - 7.4.22
Parse error: syntax error, unexpected 'in' (T_STRING) in /in/0vmXZ on line 4
Process exited with code 255.
Output for 4.3.0
Parse error: parse error, unexpected T_STRING in /in/0vmXZ on line 4
Process exited with code 255.

preferences:
159.33 ms | 1000 KiB | 7 Q