source: branches/version-2_5-dev/data/module/Compat/tests/function/time_sleep_until.phpt @ 19792

Revision 19792, 516 bytes checked in by Seasoft, 13 years ago (diff)

#744(PHP4 互換用途ソースを将来的に切り捨てやすい仕組みづくり)

Line 
1--TEST--
2Function -- time_sleep_until
3--SKIPIF--
4<?php if (function_exists('time_sleep_until')) { echo 'skip'; } ?>
5--FILE--
6<?php
7require_once 'PHP/Compat.php';
8PHP_Compat::loadFunction('time_sleep_until');
9
10function ehandler($no, $str)
11{
12    echo '(Warning) ';
13}
14set_error_handler('ehandler');
15
16$time = time();
17time_sleep_until($time + 3);
18echo '3:', time() - $time;
19
20echo PHP_EOL;
21
22$time = time();
23time_sleep_until($time - 1);
24echo '-1:', time() - $time;
25
26restore_error_handler();
27?>
28--EXPECT--
293:3
30(Warning) -1:0
Note: See TracBrowser for help on using the repository browser.