Bug #14901: Add a new language construct which prints to stderr by default

From: Date: Mon, 07 Jan 2002 11:05:04 +0000
Subject: Bug #14901: Add a new language construct which prints to stderr by default
Groups: php.dev 
Request: Send a blank email to php-dev+get-76154@lists.php.net to get a copy of this message
From:             mfischer@guru.josefine.at
Operating system: n/a
PHP version:      4.1.1
PHP Bug Type:     Feature/Change Request
Bug description:  Add a new language construct which prints to stderr by default

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 bug report at: http://bugs.php.net/?id=14901&edit=1



Thread (1 message)

  • mfischer at guru dot josefine dot at
« previous php.dev (#76154) next »