Re: [PHP-DEV] Fix for wordwrap()

[email protected] (Jedi/Sector One) Fri, 7 Mar 2003 08:20:19 +0100
Newsgroups php.dev
Message-ID <[email protected]>
On Thu, Mar 06, 2003 at 09:53:22AM -0500, Ilia A. wrote:
> you are hardcoding the 'break' as ' ',
> meaning that no other character is considered a space hence

  The documentation states that 'break' is what is used to break lines, not
what is considered a space. 

  Simple try with PHP 4.3.1 :
  
$a = "wwwwwwwwwwwwwwwwwwwwwwwww\nphprules\nwwwwwwwww";
print wordwrap($a, 10, '<br />', 10);

  Output :
  
wwwwwwwwww<br />wwwwwwwwww<br />wwwww
phpr<br />ules
wwwww<br />wwww

  Looks buggy to me.