3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function f(int $foo) { var_dump($foo); } f(1); f(1.5); f("10"); f("10gaklj");
based on hkdLE
Output for 7.0.0 - 7.2.0
int(1) int(1) int(10) Notice: A non well formed numeric value encountered in /in/7rAQF on line 3 int(10)
Output for 5.3.20 - 5.6.28
Catchable fatal error: Argument 1 passed to f() must be an instance of int, integer given, called in /in/7rAQF on line 7 and defined in /in/7rAQF on line 3
Process exited with code 255.