3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $letters = array( array( '1' => '2', '2' => '3' ), array( '1' => '3', '2' => '2' ) ); foreach ($array as $value) { $letters = array_merge($letters, $value); } echo implode(', ', $letters);
based on PKbmK
Output for 5.1.0 - 7.2.0
Notice: Undefined variable: array in /in/eoPRI on line 14 Warning: Invalid argument supplied for foreach() in /in/eoPRI on line 14 Notice: Array to string conversion in /in/eoPRI on line 18 Notice: Array to string conversion in /in/eoPRI on line 18 Array, Array
Output for 4.3.0 - 4.3.10, 4.4.0 - 5.0.5
Warning: Invalid argument supplied for foreach() in /in/eoPRI on line 14 Notice: Array to string conversion in /in/eoPRI on line 18 Notice: Array to string conversion in /in/eoPRI on line 18 Array, Array
Output for 4.3.11
Notice: Array to string conversion in /in/eoPRI on line 18 Notice: Array to string conversion in /in/eoPRI on line 18 Array, Array