[EHPweb] PHP 5.3.x
Eric M Martinez
emartinez at usgs.gov
Tue Dec 29 23:15:47 UTC 2009
All,
PHP version on EHPDevel has been updated to 5.3.1. As of 5.3.0 the
"split()" function in PHP was deprecated in favor of either
"explode()" or "preg_split()" as appropriate. You may have seen many
warnings on web pages when browsing the site on EHPDevel recently
letting you know about this. If you see this please fix the page be
replacing the deprecated function calls with the new ones as
appropriate.
Note that while "split" could accept either regex or plain text in
simple quotes, the preg_split function only accepts regex and now
requires the regex be properly delimited. For example:
Old style:
$array = split("[\r\n]", $string);
New Style:
$array = preg_split("/[\r\n]/", $string);
Note the addition of the slash (/) characters to delimit the regular
expression. This function is deprecated as of 5.3.0 and will be
removed in 6.0.0 so moving forward we should be sure to use the proper
function calls. For now EHPMaster remains at PHP 5.2.9.
FYI,
~Eric.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://geohazards.usgs.gov/pipermail/ehpweb/attachments/20091229/b2221d1b/attachment.html>
More information about the EHPweb
mailing list