#27549 [Bgs]: Removing whitespace after closing tag should be optional

From: Date: Wed, 10 Mar 2004 16:57:21 +0000
Subject: #27549 [Bgs]: Removing whitespace after closing tag should be optional
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-56243@lists.php.net to get a copy of this message
ID: 27549 User updated by: zizka at seznam dot cz Reported By: zizka at seznam dot cz Status: Bogus Bug Type: Feature/Change Request Operating System: All PHP Version: 4.3.4 New Comment: It wouldn't break ANY script if it was optional in the php.ini file. Are the Zend developers getting too lazy to improve their engine a bit? This feature, actually an intended bug, makes a lot of people mad. Tell me why shouln't it have a directive in php.ini like closing_tag_trimmed = On | Off , On by default ??? Previous Comments: ------------------------------------------------------------------------ [2004-03-10 09:26:44] derick@php.net Already filed, and already declined. ------------------------------------------------------------------------ [2004-03-10 09:19:29] zizka at seznam dot cz Description: ------------ Removing whitespace after closing tag is quite annoying and should be optional. Every webmaster looks into the page code to see what's the problem, and when he drops out of PHP parsing mode with ?> instead of echo()ing, the resulting code is quite awful: <table> <? while(list(,$val)=each($a)){?> <tr><td><?=$val['caption']?></td> <td><?=$val['text']?></td> </tr><?}?> </table> Without this feature, the output would be like this: <table> <tr><td>About PHP</td> <td>PHP's quite good thing, but still can be better</td> </tr> <tr><td>About PHP</td> <td>PHP's quite good thing, but still can be better</td> </tr> </table> But, because of it, instead of such nice code we get: <table> <tr><td>About PHP</td> <td>PHP's quite good thing, but still can be better</td> </tr> <tr><td>About PHP</td> <td>PHP's quite good thing, but still can be better</td> </tr></table> I could come up with better examples, but they would be too complex. But believe me, sometimes I get a line > 2000 characters long! (And adding echo "\n"; is out of question.) Thx ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=27549&edit=1

« previous php.bugs (#56243) next »