3v4l.org

run code in 200+ PHP versions simultaneously
<?php // this will fail type-checking /** @psalm-var list<int> $b */ $b = array_filter([1, 2, 3], function (int $v) { return $v !== 2; }); echo json_encode($b);