Re: [PHP4BETA] Standard Features ?
| From: | Sascha Schumann | Date: | Thu, 15 Jul 1999 09:37:47 +0000 |
| Subject: | Re: [PHP4BETA] Standard Features ? | ||
| References: | 1 2 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-2019@lists.php.net to get a copy of this message | ||
On Thu, Jul 15, 1999 at 12:56:45AM -0400, Rasmus Lerdorf wrote:
> > I am wondering if PHP4 supports STDIN, STDOUT, STDERR, and if there is a
> > way to read command line args (ala argc, argv) when php is executed from
> > the command line.
>
> Uhh, argc,argv handling has been available for years. Dating all the way
> back to early php2 days as far as I recall.
>
> And stdout is not an issue of course. stdin/stderr can be access directly
> by opening /dev/stdin and /dev/stderr or on some operating systems this
> would be /dev/fd/0 and /dev/fd/2
Well, there is no standard way of accessing std* which is
guaranteed to work on all platforms. How about adding a new
handler to fopen-wrappers:
std://in
std://out
std://err
That way no namespace pollution of i.e. normal files takes place.
--
Regards,
Sascha Schumann
Consultant