php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29528 Incorrect interpretation of carriage return symbol (\n)
Submitted: 2004-08-05 10:03 UTC Modified: 2004-08-05 10:09 UTC
From: neon at artem-catv dot ru Assigned:
Status: Not a bug Package: Output Control
PHP Version: 4.3.8 OS: Redhat Linux 9.0
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: neon at artem-catv dot ru
New email:
PHP Version: OS:

 

 [2004-08-05 10:03 UTC] 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-08-05 10:07 UTC] 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:09 UTC] derick@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


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 19 02:01:35 2024 UTC