3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test(int $a, string $b) { var_dump($a, $b); } declare(strict_types=1){ test(9, 100); }
Output for 7.0.0 - 7.0.1
Fatal error: strict_types declaration must be the very first statement in the script in /in/l3BX6 on line 8
Process exited with code 255.
Output for 5.5.24 - 5.5.30, 5.6.8 - 5.6.16
Warning: Unsupported declare 'strict_types' in /in/l3BX6 on line 8 Catchable fatal error: Argument 1 passed to test() must be an instance of int, integer given, called in /in/l3BX6 on line 12 and defined in /in/l3BX6 on line 3
Process exited with code 255.

preferences:
163.37 ms | 1395 KiB | 25 Q