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_filter( $original, static function (array $item): bool { return str_starts_with($item['id'], '11'); } ) );

Abusive script

This script was stopped while abusing our resources


preferences:
53.03 ms | 408 KiB | 5 Q