Bug #15211 Updated: println?

From: Date: Sat, 08 Jun 2002 14:38:26 +0000
Subject: Bug #15211 Updated: println?
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-9853@lists.php.net to get a copy of this message
ID: 15211 Updated by: bigredlinux@yahoo.com Reported By: dark_panda@hushmail.com Status: Open Bug Type: Feature/Change Request PHP Version: 4.1.1 New Comment: Actually, what would be HUGE is if println could determine the sapi module it is running as and then add the endline appropriately, meaning for the web it would add a '<br clear="all" />' tag after the line. But honestly, if php is really going to be considered for commandline scripting, it needs a println() feature. Previous Comments: ------------------------------------------------------------------------ [2002-01-24 13:36:56] dark_panda@hushmail.com I'm in the midst of doing quite a bit of shell/command line stuff with PHP, and I think it would be kind of useful to have a println construct, much like in Java or a number of other languages. println is identical to print, but a newline/carriage return is appended to the output. I know I could just write function in PHP or even a function in an extension to provide the same functionality, but it might as well be in the language itself, if only because it may be used often enough to warrant inclusion. (I know I'd use it all the time.) I started trying to add it myself (I can see that it would go in the Zend engine, correct?) but after reminding myself that I've never used Lex before (nor really looked at the Zend code) I decided that this would be best left to someone who actually knows what they're doing when it comes to the Zend engine. The only problem I can think of is portability, specifically the oft-cursed differences between OS newline sequences. (Is it \n? \r\n? \n\r? Dammit?!) Doesn't seem like a huge issue, though, does it? J ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=15211&edit=1

« previous php.bugs (#9853) next »