php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31670 new line character
Submitted: 2005-01-23 19:36 UTC Modified: 2005-01-23 19:51 UTC
From: ethanym at gmail dot com Assigned:
Status: Not a bug Package: Performance problem
PHP Version: 5.0.3 OS: Windows XP Pro
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: ethanym at gmail dot com
New email:
PHP Version: OS:

 

 [2005-01-23 19:36 UTC] ethanym at gmail dot com
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-01-23 19:51 UTC] derick@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 08:01:29 2024 UTC