[PHP] Pause execution for a number of microseconds

Created on November 30, 2026

Use usleep to pause execution. The following example requests a pause of 100 microseconds.

usleep(100);

To observe the delay, print a Unix timestamp before and after a pause of 1,000,000 microseconds, or one second.

<?php

echo 'start: ' . time() . PHP_EOL;
usleep(1000000);
echo 'end: ' . time() . PHP_EOL;

Example output

start: 1609041531
end: 1609041532
PHP