* Thus wrote Robert Cummings ([EMAIL PROTECTED]):
> I wanted t play around with the CGI (not CLI) version of PHP and get a
> feel for the I/O stuff, specifically STDIN. So I whipped up the
> following script:
>
> ///////////////////////////////////////////////////////////////////
>
> #!/usr/bin/php -qC
> <?
>
> if( ($stdin = fopen( 'php://stdin', 'r' )) === false )
> {
> echo 'Failed to open STDIN'."\n";
> exit();
> }
>
> stream_set_blocking( $stdin, false );
I believe this is not needed, stdin is nonblocking all the time.
>
> $count = 0;
> while( 1 )
this will never exit until php runs out of memory, and most likely
will lead to unexpected results.
Curt
--
"I used to think I was indecisive, but now I'm not so sure."
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php