3v4l.org

run code in 300+ PHP versions simultaneously
<?php $that = array(); $that[] = array(3, "cat"); $that[] = array(1, "dog"); $empty = array(); foreach ($that as $word) { $empty = $empty + array_fill(count($empty), $word[0], $word[1]); } var_dump($empty);

preferences:
50.96 ms | 402 KiB | 5 Q