blob: 3b46a35e5dc36755f7c6085c29d5f7ffca0c6790 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
--TEST--
Test sleep() function : error conditions
--FILE--
<?php
/* Prototype : int sleep ( int $seconds )
* Description: Delays the program execution for the given number of seconds .
* Source code: ext/standard/basic_functions.c
*/
set_time_limit(20);
echo "*** Testing sleep() : error conditions ***\n";
echo "\n-- Testing sleep() function with negative interval --\n";
$seconds = -10;
var_dump( sleep($seconds) );
?>
===DONE===
--EXPECTF--
*** Testing sleep() : error conditions ***
-- Testing sleep() function with negative interval --
Warning: sleep(): Number of seconds must be greater than or equal to 0 in %s on line %d
bool(false)
===DONE===
|