3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function test(int $a, string $b) { var_dump($a, $b); } declare(strict_types=1){ test(9, 100); }
based on KnpEB
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.3.20 - 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.