Original address: http://www.cnblogs.com/mfryf/archive/2012/05/31/2527307.html
When PHP is upgraded to 5.3, the program will report the error of Function split () is deprecated.
This is because of a variety of reasons (mainly about the cause of the regular, specifically, see later), split this function is not supported in the new version.
In PHP, the use of deprecated function will be an error, must be rid of. (The deprecated function in Java just gives a warning and can continue to use)
What's the change? Look at the first parameter, if the first argument is not a regular expression, split changes to explode, and if it is a regular expression, split changes to Preg_split.
Explode will be much faster than before, because the former has to consider the regular, explode do not consider the regular.
————-
PHP 5.3.0 after the regex, want to use the PCRE, POSIX regex is not recommended to use (the system of a regex, avoid too many?).
So the following is the non-recommended function (POSIX), with a list of proposed function (PCRE), see: PHP:
Differences from POSIX Regex
* Posix→pcre
* Ereg_replace () →preg_replace ()
* Ereg () →preg_match ()
* Eregi_replace () →preg_replace ()
* EREGI () →preg_match ()
* Split () →preg_split ()
* Spliti () →preg_split ()
* Sql_regcase () →no equivalent
* Split with Regex, can be replaced by Preg_split ()
* Do not need a regex, as long as you want to quickly split the fixed string, can be replaced by explode (). (Speed is much faster than the need for a regex)
PHP Function split () is deprecated workaround