xref: /PHP-8.2/ext/standard/tests/misc/gh14774.phpt (revision 23751876)
1--TEST--
2GH-14774 time_sleep_until overflow
3--SKIPIF--
4<?php
5if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
6?>
7--FILE--
8<?php
9foreach([INF, -INF, 10e300, -10e300, NAN, -NAN] as $var) {
10	try {
11		time_sleep_until($var);
12	} catch (\ValueError $e) {
13		echo $e->getMessage() . PHP_EOL;
14	}
15}
16?>
17--EXPECTF--
18time_sleep_until(): Argument #1 ($timestamp) must be between 0 and %d
19time_sleep_until(): Argument #1 ($timestamp) must be between 0 and %d
20time_sleep_until(): Argument #1 ($timestamp) must be between 0 and %d
21time_sleep_until(): Argument #1 ($timestamp) must be between 0 and %d
22time_sleep_until(): Argument #1 ($timestamp) must be between 0 and %d
23time_sleep_until(): Argument #1 ($timestamp) must be between 0 and %d
24