3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Cl {} function x(int $v) {} x(new Cl());
Output for 8.0.1 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.25, 8.4.1 - 8.4.12
Fatal error: Uncaught TypeError: x(): Argument #1 ($v) must be of type int, Cl given, called in /in/XOZBB on line 7 and defined in /in/XOZBB:5 Stack trace: #0 /in/XOZBB(7): x(Object(Cl)) #1 {main} thrown in /in/XOZBB on line 5
Process exited with code 255.
Output for 7.4.0 - 7.4.33
Fatal error: Uncaught TypeError: Argument 1 passed to x() must be of the type int, object given, called in /in/XOZBB on line 7 and defined in /in/XOZBB:5 Stack trace: #0 /in/XOZBB(7): x(Object(Cl)) #1 {main} thrown in /in/XOZBB on line 5
Process exited with code 255.

preferences:
98.51 ms | 407 KiB | 5 Q