PHP: Error Deprecated:function split () is Deprecated in ... Solutions

Source: Internet
Author: User
Tags deprecated posix
PHP: Error Deprecated:function split () is Deprecated in ... Solutions

PHP5.3 split () is not recommended for use in the following reasons:
After PHP 5.3.0 the regex, want to use the PCRE specifications, POSIX regex is not recommended (unified regex, avoid too many specifications?).

So the following is the not recommended function (POSIX), with the proposed replacement function (PCRE) list, detailed visible: 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


PHP Split () Alternative
* 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 will be much faster than the need for a regex)

PHP: Error Deprecated:function split () is Deprecated in ... Solutions

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.