After PHP is upgraded to 5.3,ProgramThe error "function split () is deprecated" is returned.
This is because of various reasons (mainly for the reason of regular expressions, see below for details). The split function is not supported in the new version.
In PHP, an error is returned when deprecated function is used again. (The deprecated function in Java only provides a warning and can be used again)
Why? Check the first parameter. If the first parameter is not a regular expression, change split to explode. If it is a regular expression, change split to preg_split.
Explode is much faster than before, because regular expressions are used before, while explode does not.
-----
The RegEx after PHP 5.3.0 is expected to use the PCRE specification. POSIX RegEx is not recommended (Unified RegEx to avoid too many specifications ?).
Therefore, the following is a list of functions (PCRE) not recommended for use (POSIX) and recommended for replacement: 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 of RegEx is required, which can be replaced by preg_split ().
* No RegEx is required. You only need to quickly split a fixed string and replace it with explode (). (The speed is much faster than that of RegEx)