1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext/standard/tests/misc/gh14774.phpt
2024-07-06 20:43:59 +01:00

24 lines
747 B
PHP

--TEST--
GH-14774 time_sleep_until overflow
--SKIPIF--
<?php
if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
?>
--FILE--
<?php
foreach([INF, -INF, 10e300, -10e300, NAN, -NAN] as $var) {
try {
time_sleep_until($var);
} catch (\ValueError $e) {
echo $e->getMessage() . PHP_EOL;
}
}
?>
--EXPECTF--
time_sleep_until(): Argument #1 ($timestamp) must be between 0 and %d
time_sleep_until(): Argument #1 ($timestamp) must be between 0 and %d
time_sleep_until(): Argument #1 ($timestamp) must be between 0 and %d
time_sleep_until(): Argument #1 ($timestamp) must be between 0 and %d
time_sleep_until(): Argument #1 ($timestamp) must be between 0 and %d
time_sleep_until(): Argument #1 ($timestamp) must be between 0 and %d