[nycphp-talk] determining empty STDIN | php://stdin (cli)
jon baer
jonbaer at jonbaer.net
Tue Sep 23 12:03:11 EDT 2003
just wanted to point out that STDIN/STDOUT/STDERR with --enable-cli resolves
to a resource automatically
(http://www.zend.com/manual/features.commandline.php)
STDIN = resource of "php://stdin"
same for
$_SERVER['argv'][1] = $argv[1]
here is another example i notice that does not work as it should:
ini_set("max_execution_time", "5");
$in = fgets(STDIN);
echo $in;
throws:
Fatal error: Maximum execution time of 5 seconds exceeded.
- jon
>>> ran a similar test. Do note though, the first parameter to the function
is supposed to be a resource ID. <<<
More information about the talk
mailing list