summaryrefslogtreecommitdiff
path: root/Zend/tests/type_declarations/scalar_float_with_invalid_default.phpt
blob: 7bc2fda2b9bc7544b238b36d8b846bd7312c26c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--TEST--
Float type should not allow invalid types as default
--FILE--
<?php

function test(float $arg = true)
{
    var_dump($arg);
}

test();

?>
--EXPECTF--

Fatal error: Default value for parameters with a float type can only be float, integer, or NULL in %s on line %d