3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php declare(strict_types=1); function foobar(int $a): int { return ""; } foobar();
based on EBM5C
Output for 7.1.0 - 7.2.0
Fatal error: Uncaught ArgumentCountError: Too few arguments to function foobar(), 0 passed in /in/CUHKd on line 9 and exactly 1 expected in /in/CUHKd:5 Stack trace: #0 /in/CUHKd(9): foobar() #1 {main} thrown in /in/CUHKd on line 5
Process exited with code 255.
Output for 7.0.0 - 7.0.20
Fatal error: Uncaught TypeError: Argument 1 passed to foobar() must be of the type integer, none given, called in /in/CUHKd on line 9 and defined in /in/CUHKd:5 Stack trace: #0 /in/CUHKd(9): foobar() #1 {main} thrown in /in/CUHKd on line 5
Process exited with code 255.
Output for 5.3.20 - 5.6.28
Warning: Unsupported declare 'strict_types' in /in/CUHKd on line 3 Parse error: syntax error, unexpected ':', expecting '{' in /in/CUHKd on line 5
Process exited with code 255.