From: zizka at seznam dot cz
Operating system: All
PHP version: 4.3.4
PHP Bug Type: Feature/Change Request
Bug description: Removing whitespace after closing tag should be optional
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 bug report at http://bugs.php.net/?id=27549&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27549&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27549&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=27549&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=27549&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=27549&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=27549&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=27549&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=27549&r=support
Expected behavior: http://bugs.php.net/fix.php?id=27549&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=27549&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=27549&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=27549&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27549&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=27549&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=27549&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=27549&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27549&r=float