"; "> "; " />
Easy Tutorial
❮ Func Array Intersect Assoc Php Imagecolorexact ❯

PHP usleep() Function

PHP Misc Reference Manual

Example

Delay the execution of the current script by 5 seconds (5000000 microseconds):

<?php
echo date('h:i:s') . "<br>";

// Sleep for 5 seconds
usleep(5000000);

// Resume execution
echo date('h:i:s');
?>

Definition and Usage

The usleep() function delays the execution of the current script by a specified number of microseconds (one microsecond is one millionth of a second).

Note: If the specified number of seconds is negative, the function will throw an error.


Syntax

Parameter Description
microseconds Required. Specifies the number of microseconds to delay the script execution.

Technical Details

Return Value: No return value.
PHP Version: 4+
--- ---
Changelog: This function was implemented on Windows platforms starting from PHP 5.
--- ---

PHP Misc Reference Manual

❮ Func Array Intersect Assoc Php Imagecolorexact ❯