3v4l.org

run code in 300+ PHP versions simultaneously
<?php $original = []; foreach (range(1, 20_000) as $iteration) { $original[] = [ 'id' => str_repeat("{$iteration}.", 4), 'name' => 'name', ]; } var_dump( array_reduce( $original, static function (array $result, array $item): array { $result[] = "{$item['id']}#{$item['name']}"; return $result; }, [] ) );

Abusive script

This script was stopped while abusing our resources


preferences:
28.09 ms | 407 KiB | 5 Q