#44276 [Opn]: nl2br function doesn't work as described
| From: | philip@php.net | Date: | Thu, 28 Feb 2008 00:37:58 +0000 |
| Subject: | #44276 [Opn]: nl2br function doesn't work as described | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-550@lists.php.net to get a copy of this message | ||
ID: 44276
Updated by: philip@php.net
Reported By: lokitek at gmail dot com
Status: Open
Bug Type: Documentation problem
Operating System: el5
PHP Version: Irrelevant
New Comment:
Please run this code and print its output here:
<?php
phpinfo(INFO_GENERAL);
echo "\n\n<br />\n\n";
var_dump( nl2br("foo isn't\n bar") );
?>
If something sensitive appears in there, remove it first.
Previous Comments:
------------------------------------------------------------------------
[2008-02-28 00:10:42] lokitek at gmail dot com
Description:
------------
Using the example supplied of:
echo nl2br("foo isn't\n bar");
My php 5.1.6 is actually echoing out:
foo isn't<br> bar
This is NOT xhtml compliant since it's suppose to be <br />
Anyone experienced this?
extra info:
PHP 5.1.6 (cli)
Reproduce code:
---------------
echo nl2br("foo isn't\n bar");
Expected result:
----------------
foo isn't<br /> bar
Actual result:
--------------
foo isn't<br> bar
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=44276&edit=1