[SLL] How to write stderr in PHP

Xeno Campanoli xcampanoli at gmail.com
Thu Feb 14 14:37:40 PST 2008


Jeremy C. Reed wrote:
>> I'm finding my O'Reilly reference AND even Google unhelpful in trying to
>> figure out how to write to stderr in PHP.  Anybody here have any hints?
> 
> Here is one way:
> 
> [root at ops ~]# cat J.php
> <?php
> 
> fwrite(STDERR, "to stderr\n");
> ?>
> [root at ops ~]# php -q ~/J.php 2>J
> [root at ops ~]# cat J
> to stderr
> 
Thank you.

-- 
The only sustainable organizing methods focus not on scale,
but on good design of the functional unit,
not on winning battles, but on preservation.


More information about the linux-list mailing list