3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php declare(strict_types=1); function f(float $f) { echo $f; } f(2.0);
based on adICQ
Output for 7.0.0 - 7.2.0
2
Output for 5.3.21 - 5.6.28
Warning: Unsupported declare 'strict_types' in /in/pR1m3 on line 3 Catchable fatal error: Argument 1 passed to f() must be an instance of float, double given, called in /in/pR1m3 on line 9 and defined in /in/pR1m3 on line 5
Process exited with code 255.