Req #21891 [Com]: Closing PHP tag and Newlines Revisted

From: Date: Wed, 30 Oct 2013 11:30:33 +0000
Subject: Req #21891 [Com]: Closing PHP tag and Newlines Revisted
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-182493@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=21891&edit=1 ID: 21891 Comment by: a dot valid at email dot address Reported by: hz11 at nyu dot edu Summary: Closing PHP tag and Newlines Revisted Status: Wont fix Type: Feature/Change Request Package: *General Issues Operating System: FreeBSD/Linux PHP Version: 4.3.0 Block user comment: N Private report: N New Comment: Hello <?= $phpDevelopers ?>, I'm trying to use your "language", but I have no idea, how to output a value of variable at and of the line, like <?= $here ?> My newline is always removed. So when I need to save it, I have to use <?= $swearWords, "\n" /* because PHP sucks */ ?> Please please, help me! Previous Comments: ------------------------------------------------------------------------ [2010-03-30 19:58:00] rasmus@php.net Because working scripts may break if you change this behaviour in your php.ini file. That means people trying to write portable code would have to check the .ini setting which in turn means it becomes harder to write portable code. And by breaking I mean things that send out headers as the first output. These would break if suddenly newlines started appearing that didn't appear before. So no, this will not change and we won't add a php.ini switch for it either. ------------------------------------------------------------------------ [2010-03-30 19:51:58] sarimarton at gmail dot com I need an explanation on this claim: "Making a setting in php.ini would make writing portable scripts harder, so that's a no-go too." It doesn't seem to have a valid sense. ------------------------------------------------------------------------ [2004-03-11 05:19:35] zizka at seznam dot cz Sorry but still I don't understand, why some new option in php.ini "would make writing portable scripts harder", if the default option would make PHP behave the SAME way as so far, that means (in this case), removing (\r)\n after ?>, and the second option would make it leave it there. Or, if it's really true, why have we the options like arg_separator.input and magic_quotes_gpc then? What's so hard in writing portable scripts like now and leaving this option with the default falue, while other people, using PHP for e.g. nice-formatted HTML, C++ code, ASCII, or XML, would change it? ... Doesn't make a sense... ------------------------------------------------------------------------ [2004-03-10 12:21:35] derick@php.net Making a setting in php.ini would make writing portable scripts harder, so that's a no-go too. ------------------------------------------------------------------------ [2004-03-10 11:48:37] zizka at seznam dot cz Heeeeeeeeeeeeeeyyy!!! Wake UP! It wouldn't break ANY script if it was optional in the php.ini file!!!! As I wrote to derick: Are the PHP developers getting too lazy to improve PHP a bit? ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=21891 -- Edit this bug report at https://bugs.php.net/bug.php?id=21891&edit=1

« previous php.bugs (#182493) next »