summaryrefslogtreecommitdiff
path: root/Zend/tests/bug73954.phpt
blob: bff81f500120c9bb2cb0b7aa6e356563fbfc6b2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--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) {
}

takes_int(log(tan(3.14)));

?>
--EXPECTF--
float(NAN)
bool(true)

Fatal error: Uncaught TypeError: takes_int(): Argument #1 ($int) must be of type int, float given, called in %s:%d
Stack trace:
#0 %s(9): takes_int(NAN)
#1 {main}
  thrown in %s on line 6