ID: 37846 User updated by: bugs dot php dot net at jonatan dot com Reported By: bugs dot php dot net at jonatan dot com -Status: Bogus +Status: Open Bug Type: Strings related Operating System: Mac OS X 10.4.6 PHP Version: 5.1.4 New Comment:
unbogusing bug Previous Comments: ------------------------------------------------------------------------ [2006-06-19 16:31:47] bugs dot php dot net at jonatan dot com You seem to be just as confused as the other guy. ;-) Sure, I guess the slight vagueness of the documentation could allow you to argue that wordwrap() wraps the third line incorrectly and the fifth one correctly instead of the other way around. But that doesn't negate the fact that this is a bug, it would just make it a much bigger bug, affecting the majority of lines wrapped by wordwrap() instead of the minority. Also note that your claim is refuted by the examples in the documentation, specifically the line "jumped over the lazy" which is 20 characters long. 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. ------------------------------------------------------------------------ [2006-06-19 15:57:50] [EMAIL PROTECTED] "wordwrap() - Returns a string with str wrapped ****AT**** the column number specified by the optional width parameter." "Some text" <- the last "t" is symbol #9, so whole "text" word is wrapped (since you didn't pass third argument). ------------------------------------------------------------------------ [2006-06-19 15:14:13] bugs dot php dot net at jonatan dot com No, I think you're the only one who is confused. ;-) I'm pretty sure this is a bug. The problem is that PHP only cuts some of the lines (the third in my example) at position 9, and incorrectly cuts some lines (the fifth in my example) at position 8. ------------------------------------------------------------------------ [2006-06-19 13:33:00] [EMAIL PROTECTED] Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. You may be confused with your "virtual" lines (as I was as well :). worwrap does wrap at the pos. 9 and this is what it does. Word are not cuted. ------------------------------------------------------------------------ [2006-06-19 13:09:57] [EMAIL PROTECTED] reproducible in dev branches (5.2 and head), on other OS/platform than OSX as well. ------------------------------------------------------------------------ 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