#31670 [NEW]: new line character

From: Date: Sun, 23 Jan 2005 18:36:24 +0000
Subject: #31670 [NEW]: new line character
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-72701@lists.php.net to get a copy of this message
From: ethanym at gmail dot com Operating system: Windows XP Pro PHP version: 5.0.3 PHP Bug Type: Performance problem Bug description: new line character Description: ------------ The newline character "\n" is being translated by the engine as a non-breaking space. Reproduce code: --------------- <?php $price = 3.95; $tax_rate = 0.08; $tax_amount = $price * $tax_rate; $total_cost = $price + $tax_amount; $username = 'james'; $domain = '@example.com'; $email_address = $username . $domain; print 'The tax is ' . $tax_amount; print "\n"; print 'The total cost is ' .$total_cost; print "\n"; print $email_address; ?> Expected result: ---------------- The tax is 0.316 The total cost is 4.266 james@example.com Actual result: -------------- The tax is 0.316 The total cost is 4.266 james@example.com -- Edit bug report at http://bugs.php.net/?id=31670&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31670&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31670&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31670&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=31670&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=31670&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31670&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31670&r=needscript Try newer version: http://bugs.php.net/fix.php?id=31670&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31670&r=support Expected behavior: http://bugs.php.net/fix.php?id=31670&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31670&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31670&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=31670&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31670&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=31670&r=dst IIS Stability: http://bugs.php.net/fix.php?id=31670&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31670&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31670&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=31670&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=31670&r=mysqlcfg

« previous php.bugs (#72701) next »