3v4l.org

run code in 300+ PHP versions simultaneously
<?php function needInt(int $int): int { return $int + 1; } var_dump(needInt(1.0));

preferences:
59.13 ms | 402 KiB | 5 Q