From:             neon at artem-catv dot ru
Operating system: Redhat Linux 9.0
PHP version:      4.3.8
PHP Bug Type:     Output Control
Bug description:  Incorrect interpretation of carriage return symbol (\n)

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 bug report at http://bugs.php.net/?id=29528&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=29528&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=29528&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=29528&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=29528&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=29528&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=29528&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=29528&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=29528&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=29528&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=29528&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=29528&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=29528&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29528&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=29528&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=29528&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=29528&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29528&r=float

Reply via email to