#29528 [Bgs]: Incorrect interpretation of carriage return symbol (\n)
| From: | derick@php.net | Date: | Thu, 05 Aug 2004 08:09:09 +0000 |
| Subject: | #29528 [Bgs]: Incorrect interpretation of carriage return symbol (\n) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-64113@lists.php.net to get a copy of this message | ||
ID: 29528
Updated by: derick@php.net
Reported By: neon at artem-catv dot ru
Status: Bogus
Bug Type: Output Control
Operating System: Redhat Linux 9.0
PHP Version: 4.3.8
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Previous Comments:
------------------------------------------------------------------------
[2004-08-05 10:07:58] tony2001@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
------------------------------------------------------------------------
[2004-08-05 10:03:44] neon at artem-catv dot ru
Description:
------------
If carriage return (\n) symbol placed between single commas PHP will
output it as is. If it placed between double commas all be ok.
Reproduce code:
---------------
<?php
echo '\nTest\n'; /* outouts \nTest\n */
echo "\nTest\n"; /* outouts
Test */
// or
$var1 = 'Enother\nTest';
$var2 = "Enother\nTest";
echo $var1; /* outputs Enother\nTest*/
echo $var2; /* outputs Enother
Test*/
?>
Expected result:
----------------
Test
Test
Enother
Test
Enother
Test
Actual result:
--------------
\nTest\n
Test
Enother\nTestEnother
Test
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29528&edit=1