php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #51483 nl2p() function
Submitted: 2010-04-05 20:05 UTC Modified: 2018-05-08 19:23 UTC
Votes:10
Avg. Score:4.6 ± 0.7
Reproduced:6 of 6 (100.0%)
Same Version:5 (83.3%)
Same OS:5 (83.3%)
From: franz at fluxbb dot org Assigned:
Status: Suspended Package: Strings related
PHP Version: Irrelevant OS: any
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
34 + 36 = ?
Subscribe to this entry?

 
 [2010-04-05 20:05 UTC] franz at fluxbb dot org
Description:
------------
The nl2br() function has been very benefitial to many people, I suppose.

However, these days it is seen as much nicer to wrap paragraphs in <p> tags rather 
than using <br> to split them up.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-05-08 19:23 UTC] cmb@php.net
-Status: Open +Status: Suspended -Package: Unknown/Other Function +Package: Strings related
 [2018-05-08 19:23 UTC] cmb@php.net
I don't think that nl2br() actually deserves to be in core PHP,
since it can easily be written in userland.  Adding yet another
string function for a similar purpose is questionable, so it would
at least require discussion on the internals mailing list[1], and
maybe the RFC process[2].

For the time being, I'm suspending this ticket.

[1] <http://www.php.net/mailing-lists.php>
[2] <https://wiki.php.net/rfc/howto>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 00:01:28 2024 UTC