3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = array( 'abc' => 123, 'def' => 456, 'test' => array( 123 => 'hip', 'hop' => array( 'tip' => 'top', 'top' => null ) ) ); foreach ($test as $old => $arr) { if (is_array($arr)) { unset($test[$old]); foreach ($arr as $new => $v) { $test[$old.$new] = $v; } } } var_dump($test);

preferences:
45.21 ms | 402 KiB | 5 Q