xref: /PHP-8.0/Zend/tests/bug73954.phpt (revision 960318ed)
1--TEST--
2Bug #73954 (NAN check fails on Alpine Linux with musl)
3--FILE--
4<?php
5
6var_dump(NAN);
7var_dump(is_nan(NAN));
8
9function takes_int(int $int) {
10}
11
12takes_int(log(tan(3.14)));
13
14?>
15--EXPECTF--
16float(NAN)
17bool(true)
18
19Fatal error: Uncaught TypeError: takes_int(): Argument #1 ($int) must be of type int, float given, called in %s:%d
20Stack trace:
21#0 %s(9): takes_int(NAN)
22#1 {main}
23  thrown in %s on line 6
24