#14901 [Opn->Csd]: Add a new language construct which prints to stderr by default

From: Date: Fri, 07 Feb 2003 03:11:34 +0000
Subject: #14901 [Opn->Csd]: Add a new language construct which prints to stderr by default
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-32351@lists.php.net to get a copy of this message
ID: 14901 Updated by: iliaa@php.net Reported By: mfischer@guru.josefine.at -Status: Open +Status: Closed Bug Type: Feature/Change Request Operating System: n/a PHP Version: 4.1.1 New Comment: This bug has been fixed in CVS. In case this was a PHP problem, snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites in short time. Thank you for the report, and for helping us make PHP better. As of PHP 4.3.0 you have STDERR constant that you can use to echo stuff to stderr. Ex. fwrite(STDERR, "error\n"); Previous Comments: ------------------------------------------------------------------------ [2002-01-07 06:05:03] mfischer@guru.josefine.at A new language construct as a 'friend' to echo wouldn't be a bad idea IMHO. Something like echoerr which prints to stderr instead of stdout (and does not use output buffering of course). The current situation requires the following steps: $f = fopen('php://stderr', 'w'); fputs($f, 'debug message'); close($f); which is ... well, it's nice to have but cumbersome to use (obviously, I hope). Example: echo "ene", "mene", str_repeat('bla', '3), "\n"; should just work with echoerr the same: echoerr "ene", "mene", str_repeat('bla', '3), "\n"; The reason I'm for a language construct: Make it as similar to use as echo itself. Not requireing it having to use parentheses. Easily to replaceable echo and echoerr. That's it, flames on. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=14901&edit=1

« previous php.bugs (#32351) next »