PHP time_sleep_until() Functie
Voorbeeld
Laat het script 3 seconden slapen:
<?php
time_sleep_until(time()+3);
echo "Hello";
?>
Definitie en gebruik
De functie time_sleep_until() wordt gebruikt om een script te laten slapen tot de opgegeven tijd.
Syntaxis
time_sleep_until(timestamp)
Parameterwaarden
Parameter | Description |
---|---|
timestamp | Required. Specifies when the script should wake |
Technische details
Winstwaarde: | Retourneert TRUE bij succes of ONWAAR bij mislukking |
---|---|
PHP-versie: | 5.1.0+ |
Wijzigingslogboek: | Deze functie werkte niet op Windows-platforms tot PHP 5.3.0 |
❮ PHP overige referentie