2017-02-05 09:30:20 +08:00
|
|
|
--TEST--
|
|
|
|
Bug #73954 (NAN check fails on Alpine Linux with musl)
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
|
|
|
|
var_dump(NAN);
|
|
|
|
var_dump(is_nan(NAN));
|
|
|
|
|
|
|
|
function takes_int(int $int) {
|
|
|
|
}
|
|
|
|
|
2017-02-07 20:16:30 +08:00
|
|
|
takes_int(log(tan(3.14)));
|
2017-02-05 09:30:20 +08:00
|
|
|
|
|
|
|
?>
|
|
|
|
--EXPECTF--
|
|
|
|
float(NAN)
|
|
|
|
bool(true)
|
|
|
|
|
2018-02-04 21:33:49 +08:00
|
|
|
Fatal error: Uncaught TypeError: Argument 1 passed to takes_int() must be of the type int, float given, called in %s on line 9 and defined in %s:6
|
2017-02-05 09:30:20 +08:00
|
|
|
Stack trace:
|
|
|
|
#0 %s(9): takes_int(NAN)
|
|
|
|
#1 {main}
|
|
|
|
thrown in %s on line 6
|