PHP 5.3 and 5.5 obsolete/expired function collation

Source: Internet
Author: User
Tags deprecated ereg modifier

Do PHP believe all know, from PHP5.3 began to add a new level of error deprecated, will be discarded/expired. We have come in a version.

In php5.3 the functions that are waived are:

  code is as follows &nbs P;

Call_user_method () (using Call_user_func () instead)
Call_user_method_a Rray () (using Call_user_func_array () instead)
Define_syslog_variables ()
DL ()
Ereg () (using  preg_match () instead)
Ereg_replace () (using Preg_replace () instead)
Eregi () (using Preg_match () with the ' I ' modifier instead)
Eregi_replace () (using Preg_replace () to match ' i ' modifier substitution)
Set_magic_quotes_runtime () and its alias function magic_quotes_runtime ()
Session_register () () () () () (using $_session super all variables instead
Session_unregister () (Replace with $_session super full variable)
session_is_registered () (Replace with $_session super full variable)
Set_socket_ Blocking () (using stream_set_blocking () instead)
Split () (using Preg_split () instead)
Spliti () (Replace with the ' i ' Modifier with preg_split ())
Sql_regcase ()
Mysql_db_query () (using mysql_select_db () and mysql_query () overrides)
Mysql_escape_string () (using Mysql_real_ Escape_string () overrides)

MysQl_close (); All shutdowns are not supported and need to be changed to: Mysql_close ($link);

Discards the locale name by passing the string. Replace with Lc_* series constants.

IS_DST parameter for Mktime (). Replace with the new time zone handler function.

PHP 5.4

The code is as follows

Mcrypt_generic_end ()
Mysql_list_dbs ()

PHP 5.5

The code is as follows
MCRYPT_CBC ()
MCRYPT_CFB ()
MCRYPT_ECB ()
MCRYPT_OFB ()

Among them, PHP 5.3 is the beginning of obsolete functions, a lot of common former regular ereg all replace Preg, this is ok I used to know. All replaced, but the magic quotes ... It also starts to discard from PHP 5.3, and PHP 5.4 is removed. This is a big change in PHP 5.3.

PHP 5.4 began to add a lot of features, this can be online search, add a lot of special wording. may be according to the new wording, the old programmer can not see very understand ~ ~ ~ ~

PHP 5.5 How to say, today just discovered ~ actually put the MySQL this extension removed, suggest the use of mysqli or PDO ... Use 5.5 Many programs will be an error, prompted Mysql_connect is about to expire ~ ~ will see the following errors

Deprecated:mysql_connect (): The MySQL extension is deprecated and'll be removed in the Future:use mysqli or PDO Instea D in E:testnew 6.php on line 6

PHP5 relative to 4 of the biggest is the part of the class, and the impact is more to discard these old habits of things. Although the version has been upgraded, but eventually the market is still a large number of 5.1.6-5.2.17. 5.3 Start to discard a lot of characteristics, resulting in many programs are not directly on the 5.5. Direct seconds to kill a large number of open source Oh ~ ~ ~

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.