note 40426 added to function.wordwrap

From: Date: Wed, 03 Mar 2004 15:10:02 +0000
Subject: note 40426 added to function.wordwrap
Groups: php.notes 
Request: Send a blank email to php-notes+get-66170@lists.php.net to get a copy of this message
Response to the wordwrap2 function posted by desolate19 at hotmail dot com... The function works great, but if you're designing scripts for maximum portability between PHP versions, keep in mind that the function ctype_space is only enabled by default after PHP 4.2.0. I had to change the ctype_space($chr) to preg_match("/\s/", $chr) in order to fix it for some users on other machines. This, of course, is slower, but I wasn't wrapping 1,000s of lines in the script I was building anyway. ---- Manual Page -- http://www.php.net/manual/en/function.wordwrap.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+40426 Delete -- http://master.php.net/manage/user-notes.php?action=delete+40426&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+40426&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#66170) next »