3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = $r = $m = []; $a[1] = ['1','2','3']; $a[2] = ['4','5','6']; foreach ($a as $p) { $r = array_merge($r, $p); } var_dump($r); var_dump(array_map('array_merge', $a, &$r));
based on 1cG5s
Output for 7.0.0 - 7.0.1
Parse error: syntax error, unexpected '&' in /in/ZjGdb on line 9
Process exited with code 255.
Output for 5.4.11 - 5.6.16
Fatal error: Call-time pass-by-reference has been removed in /in/ZjGdb on line 9
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/ZjGdb on line 2
Process exited with code 255.