In PHP 7.0.14
function test(double $a) {
var_dump($a);
}
test(2.2111);
Returns "Fatal error: Uncaught TypeError: Argument 1 passed to test() must be an instance of double, float given".
function test(float $a) {
var_dump($a);
}
test(2.2111);
Prints 2.2111 to the screen.