STDOUT, STDERR not defined in CLI mode

From: Date: Fri, 08 Aug 2003 11:43:57 +0000
Subject: STDOUT, STDERR not defined in CLI mode
Groups: php.internals 
Request: Send a blank email to internals+get-3826@lists.php.net to get a copy of this message
Hi, sometimes STDIN, STDOUT and STDERR are not defined in cli mode: ~/cvs/php/php-src# ./sapi/cli/php -r 'var_dump (STDERR);' resource(3) of type (stream) ~/cvs/php/php-src# echo '<?php var_dump(STDERR); ?> ' | ./sapi/cli/php string(6) "STDERR" The attached patch removes the check for the scripts filename and always registeres the STD*-constants in PHP_MODE_STANDARD. Certainly it does not make sense to read from STDIN when called the second way, but it may be necessary to have STDOUT and STDERR defined. Also, accessing STDIN does not lead to segfaults or other oddities. - Alex

Attachment: [text/x-patch] std.diff
« previous php.internals (#3826) next »