3v4l.org

run code in 300+ PHP versions simultaneously
<?php $items = ["one", "two", "three", "one", "two", "three", "one", "two", "three", "one", "two", "three", "one", "two", "three"]; $ignore = "two"; $a = microtime(1); for ($i = 0; $i < 10000; $i++) { array_filter($items, function ($item) use ($ignore) { return $item !== $ignore; }); } echo (microtime(1) - $a) * 1000;

preferences:
29.96 ms | 405 KiB | 5 Q