3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function someFloat(\float $value) { echo "(" . gettype($value) . ") " . $value; } someFloat("1"); someFloat(1.1);
based on EtLXE
Output for 7.0.1 - 7.2.0
Fatal error: Scalar type declaration 'float' must be unqualified in /in/bknfY on line 3
Process exited with code 255.
Output for 7.0.0
(double) 1(double) 1.1
Output for 5.3.19 - 5.6.28
Catchable fatal error: Argument 1 passed to someFloat() must be an instance of float, string given, called in /in/bknfY on line 7 and defined in /in/bknfY on line 3
Process exited with code 255.