ID: 37846 Updated by: [EMAIL PROTECTED] Reported By: bugs dot php dot net at jonatan dot com -Status: Verified +Status: Bogus Bug Type: Strings related Operating System: Mac OS X 10.4.6 PHP Version: 5.1.4 New Comment:
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. Previous Comments: ------------------------------------------------------------------------ [2006-06-19 13:09:57] [EMAIL PROTECTED] reproducible in dev branches (5.2 and head), on other OS/platform than OSX as well. ------------------------------------------------------------------------ [2006-06-19 10:55:33] bugs dot php dot net at jonatan dot com Description: ------------ wordwrap() wraps incorrectly, wrapping too early in some situations. As the example below shows, PHP wraps one of the long lines ("Some text") at the maximum line length (9 characters in this case) and wraps the other one at a shorter line length. Removing the first line from the test case results in different but equally buggy wrapping. I'm using Marc Liyanage's build of PHP, version 5.1.4 on an Intel Mac. Reproduce code: --------------- <?php $input = 'Some tex '. 'Some tex '. 'Some text '. 'Some tex '. 'Some text '. 'Some tex'; echo '<pre>'.wordwrap( $input, 9 )."</pre>\n"; ?> Expected result: ---------------- Some tex Some tex Some text Some tex Some text Some tex Actual result: -------------- Some tex Some tex Some text Some tex Some text Some tex ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=37846&edit=1