3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test(int $i) { return $i; } test("123abc");
Output for 8.3.0 - 8.3.30, 8.4.1 - 8.4.17, 8.5.0 - 8.5.2
Fatal error: Uncaught TypeError: test(): Argument #1 ($i) must be of type int, string given, called in /in/WQJPv on line 7 and defined in /in/WQJPv:3 Stack trace: #0 /in/WQJPv(7): test('123abc') #1 {main} thrown in /in/WQJPv on line 3
Process exited with code 255.

preferences:
50.53 ms | 406 KiB | 5 Q