blob: 283e7f30e5bc60968370b880eb15ad0c19a3f933 (
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
27
|
--TEST--
Test usleep() function : error conditions
--FILE--
<?php
/* Prototype : void usleep ( int $micro_seconds )
* Description: Delays program execution for the given number of micro seconds.
* Source code: ext/standard/basic_functions.c
*/
set_time_limit(20);
echo "*** Testing usleep() : error conditions ***\n";
echo "\n-- Testing usleep() function with negative interval --\n";
$seconds = -10;
var_dump( usleep($seconds) );
?>
===DONE===
--EXPECTF--
*** Testing usleep() : error conditions ***
-- Testing usleep() function with negative interval --
Warning: usleep(): Number of microseconds must be greater than or equal to 0 in %s on line %d
bool(false)
===DONE===
|