#28381 [NEW]: <?= $variable ?> eats up a newline if it follows ?>
| From: | mikemc-phpbug2 at contactdesigns dot com | Date: | Thu, 13 May 2004 03:44:53 +0000 |
| Subject: | #28381 [NEW]: <?= $variable ?> eats up a newline if it follows ?> | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-59564@lists.php.net to get a copy of this message | ||
From: mikemc-phpbug2 at contactdesigns dot com
Operating system: Linux 2.4.20-28.9smp
PHP version: 4.3.6
PHP Bug Type: Scripting Engine problem
Bug description: <?= $variable ?> eats up a newline if it follows ?>
Description:
------------
This isn't a major bug, but I would think it should be classified as a bug
just so that it is on the radar screen. For those of us too lazy to write
<?php echo $variable ?> and instead prefer <?= $variable ?>, if a newline
immediately follows the "?>" then PHP eats the new line :-(
Reproduce code:
---------------
vi test.php (then insert following code and :wq Enter)
<?= $_SERVER['PHP_SELF'] ?>
I should be on a new line - but I am not!
[shellprompt]# php test.php
testing.phpI should be on a new line - but I am not!
Expected result:
----------------
testing.php
I should be on a new line - but I am not!
Actual result:
--------------
testing.phpI should be on a new line - but I am not!
--
Edit bug report at http://bugs.php.net/?id=28381&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28381&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28381&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=28381&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=28381&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=28381&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=28381&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=28381&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=28381&r=support
Expected behavior: http://bugs.php.net/fix.php?id=28381&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=28381&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=28381&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=28381&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28381&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=28381&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=28381&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=28381&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28381&r=float