3v4l.org

run code in 300+ PHP versions simultaneously
<?php $MAP = [ ['x', 'x', 'x', 'x'], ['x', 's', 'p', 'x'], ['x', 'p', 'p', 'x'], ['x', 'p', 'p', 'x'], ['x', 'p', 'p', 'x'], ['x', 'p', 'p', 'x'], ['x', 'x', 'x', 'x'], ]; function whatever_i_cba_naming_shit_at_this_time_of_night($data) { foreach ($data as $parentKey => $parent) { foreach ($parent as $childKey => $child) { yield [$parentKey, $childKey, $child]; } } } foreach (whatever_i_cba_naming_shit_at_this_time_of_night($MAP) as list($parentKey, $childKey, $child)) { echo "$parentKey/$childKey => $child\n"; }

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
131.26 ms | 2367 KiB | 11 Q