3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php declare(strict_types=1); function num(float $num){ echo $num; } num((integer)1);
based on cME6t
Output for 7.0.0 - 7.2.0
1
Output for 5.3.18 - 5.6.28
Warning: Unsupported declare 'strict_types' in /in/Ldo0K on line 2 Catchable fatal error: Argument 1 passed to num() must be an instance of float, integer given, called in /in/Ldo0K on line 7 and defined in /in/Ldo0K on line 4
Process exited with code 255.