ID: 13362
Updated by: jimw
Reported By: [EMAIL PROTECTED]
Old Status: Closed
Status: Bogus
Bug Type: Strings related
Operating System: Linux Mandrake 8.0
PHP Version: 4.0.4pl1
New Comment:

oops, meant to flag as bogus, since this is not a bug.

Previous Comments:
------------------------------------------------------------------------

[2002-01-04 14:40:38] [EMAIL PROTECTED]

this current behavior is correct. wordwrap() will only cut a word when
it is, by itself, longer than the line length. whenever it can cut the
line between words, it does.

it is easier to see what is going on using:

<?
$text="A very long woooooooooooord.";
echo wordwrap($text, 8, "|", 1);

which prints:

A very|long|wooooooo|ooooord.

------------------------------------------------------------------------

[2001-10-21 05:06:16] [EMAIL PROTECTED]

4.2.0dev shows:
A very long woooooooooooor d.

------------------------------------------------------------------------

[2001-10-20 22:25:30] [EMAIL PROTECTED]

Reproduced with PHP 4.1.0RC1


------------------------------------------------------------------------

[2001-09-18 07:33:45] [EMAIL PROTECTED]

<?
$text="A very long woooooooooooord.";
$newtext=wordwrap($text,8," ",1);
echo "$newtext\n";
?>
return:
 
A very long woooooooooooo rd.
 
not
A very long wooooooo ooooord.
 
php 4.0.4pl1


------------------------------------------------------------------------



Edit this bug report at http://bugs.php.net/?id=13362&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to