3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function someFloat(float $value) { echo "(" . gettype($float) . ") " . $float; } someFloat("1"); someFloat(1.1);
based on 0XZ14
Output for 7.0.0 - 7.2.0
Notice: Undefined variable: float in /in/boGHa on line 4 Notice: Undefined variable: float in /in/boGHa on line 4 (NULL) Notice: Undefined variable: float in /in/boGHa on line 4 Notice: Undefined variable: float in /in/boGHa on line 4 (NULL)
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/boGHa on line 7 and defined in /in/boGHa on line 3
Process exited with code 255.