php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8367 Wordwrap not cutting correctly
Submitted: 2000-12-21 17:02 UTC Modified: 2001-01-18 16:48 UTC
From: millz at incogen dot com Assigned: derick (profile)
Status: Closed Package: Strings related
PHP Version: 4.0.3pl1 OS: Solaris 7
Private report: No CVE-ID: None
 [2000-12-21 17:02 UTC] millz at incogen dot com
Calling wordwrap like this:
$sequence = "aaadaaadaaadaaada";
$sequence = wordwrap( $sequence, 4, "\n",1);

The \n is inserted correctly at the first position (just after pos 3), but is off by +1 for the remaining inserts.

Sequence becomes:
aaad
aaada
aadaa
ada

Where it should be:
aaad
aaad
aaad
aaad
a

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-08 13:28 UTC] cynic@php.net
confirmed in mod_php4 php4-200101080345
 [2001-01-08 13:31 UTC] derick@php.net
Adding this to my TODO list.
 [2001-01-18 16:48 UTC] derick@php.net
Fixed in CVS
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC