3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ids = [1, 2, 'string']; array_filter($ids, function ($id) { $pass = is_numeric($id) && $id == (int) $id; assert($pass, $id . ' is not an integer'); return $pass; });

preferences:
49.9 ms | 402 KiB | 5 Q