ID: 37846
Updated by: [EMAIL PROTECTED]
Reported By: bugs dot php dot net at jonatan dot com
Status: Bogus
Bug Type: Strings related
Operating System: Mac OS X 10.4.6
PHP Version: 5.1.4
New Comment:
<?php
// 'Some tex Some tex Some text Some tex Some text Some
tex';
$foo = "1234 678 1234 678 1234 6789 2345 789 2345 7890 2345
678";
print wordwrap($foo, 9) . "\n";
?>
1234 678
1234 678
1234 6789
2345 789
2345
7890
2345 678
The latter "t" in "text" is the TENTH character.
Now PLEASE leave this report as bogus.
Previous Comments:
------------------------------------------------------------------------
[2006-06-20 14:00:30] [EMAIL PROTECTED]
Oh, god..
Here is what wordwrap() does:
"Some tex|Some tex|Some text| Some tex| Some tex|t Some tex"
Write it down on paper and count symbols yourself.
Is everything clear for you this time? Or do I need to explain how to
count from 1 to 9?
------------------------------------------------------------------------
[2006-06-20 13:57:01] bugs dot php dot net at jonatan dot com
(Unfortunately the bug tracking system reformatted the code in
my last comment, adding a line break in the statement that
sets the $input variable, which was not intended to be there.
There is supposed to be a space (and only a space) between
each word in the string. So you'll need to change that if
copying-and-pasting. Or just use my first reproduction
example.)
------------------------------------------------------------------------
[2006-06-20 13:40:55] bugs dot php dot net at jonatan dot com
Jesus H. Christ, will you please try to actually read the
bug report before closing it as bogus.
Again:
I URGE you to look at the expected result and the actual
result and consider why wordwrap() thinks "Some text" fits
on one line while "Some text" doesn't, given that they both
start at the beginning of a line.
If you find the reproduction code formatting confusing, try
reformatting it as such:
<?php
$input = 'Some tex Some tex Some text Some tex Some text
Some tex';
echo '<pre>'.wordwrap( $input, 9 )."</pre>\n";
?>
------------------------------------------------------------------------
[2006-06-20 13:22:17] [EMAIL PROTECTED]
.
------------------------------------------------------------------------
[2006-06-20 13:17:00] bugs dot php dot net at jonatan dot com
Wow, I don't know how it's possible to misunderstand such a
simple bug report so extensively.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/37846
--
Edit this bug report at http://bugs.php.net/?id=37846&edit=1