note 87993 added to features.connection-handling
| From: | fanfear at yahoo dot com | Date: | Mon, 05 Jan 2009 09:59:15 +0000 |
| Subject: | note 87993 added to features.connection-handling | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-148843@lists.php.net to get a copy of this message | ||
i use this code when i want php infinite loop
<?php
set_time_limit (0);//run script forever
ignore_user_abort ();//run script in background
$i = 0;
echo "start\n";
while (1) {
$i++;
echo $i, "\n";
$sleep = sleep (3);
if ($sleep == 0 or $sleep or $sleep == FALSE) continue;
if (connection_aborted ()) continue;
if (connection_status () != 0) continue;
}
?>
----
Server IP: 203.121.145.123
Probable Submitter: 118.175.64.224
----
Manual Page -- http://www.php.net/manual/en/features.connection-handling.php
Edit -- https://master.php.net/note/edit/87993
Del: integrated -- https://master.php.net/note/delete/87993/integrated
Del: useless -- https://master.php.net/note/delete/87993/useless
Del: bad code -- https://master.php.net/note/delete/87993/bad+code
Del: spam -- https://master.php.net/note/delete/87993/spam
Del: non-english -- https://master.php.net/note/delete/87993/non-english
Del: in docs -- https://master.php.net/note/delete/87993/in+docs
Del: other reasons-- https://master.php.net/note/delete/87993
Reject -- https://master.php.net/note/reject/87993
Search -- https://master.php.net/manage/user-notes.php