MENU
Sleep and Halt
sleep($i) delays the execution for $i seconds.usleep($i) delays the execution for $i microseconds.
time_nanosleep($i1,$i2) delays the execution for $i1 seconds and $i2 nanoseconds. It returns TRUE on success or FALSE on failure. If the delay was interrupted by a signal, an associative array will be returned with the components: seconds (the number of seconds remaining) and nanoseconds(the number of nanoseconds remaining).
time_sleep_until($f) delays the execution until the timestamp $f.
RESETRUNFULL
<!DOCTYPE html><html><head></head>
<body><?php
$nano = time_nanosleep(3, 200000);
if ($nano === true) {
echo "Slept for 3 seconds, 200 microseconds.\n";
} elseif ($nano === false) {
echo "Sleeping failed.\n";
} elseif (is_array($nano)) {
$seconds = $nano['seconds'];
$nanoseconds = $nano['nanoseconds'];
echo "Interrupted by a signal.\n";
echo "Time remaining: $seconds seconds, $nanoseconds nanoseconds.";
}
// sleeps for another second
time_sleep_until(microtime(true)+1);
?></body></html>
RESETRUNFULL
<?php // test.php
// open this file
$fp = fopen(__FILE__, 'r');
// seek file pointer to data
fseek($fp, __COMPILER_HALT_OFFSET__);
// and output it
var_dump(stream_get_contents($fp));
// the end of the script execution
__halt_compiler();
the installation data (eg. tar, gz, PHP, etc.) <br />
<!DOCTYPE html><html><head></head>
<body><?php
echo "A<br />";
require "test.php";
echo "<br />B";
?></body></html>