What are the disposal and expiration functions of PHP5.3 and 5.5?

Source: Internet
Author: User
What are the disposal and expiration functions of PHP5.3 and 5.5?
This article introduces some obsolete and expired functions in PHP5.3 and 5.5. when using php functions, you should pay attention to them as a reference for interested friends.

A new error level DEPRECATED is added from PHP5.3, which is about to be discarded/expired.

Functions abandoned in php5.3 include:

Call_user_method () // replace call_user_func () with call_user_method_array () // replace define_syslog_variables () dl () ereg () // replace ereg_replace () with preg_match () // use preg_replace () to replace eregi () // use preg_match () with the 'I' modifier to replace eregi_replace () // use preg_replace () use the 'I' modifier to replace set_magic_quotes_runtime () // and its alias function magic_quotes_runtime () session_register () // use $ _ SESSION to replace session_unregister () // use $ _ SESSION to replace session_is_registered () // use $ _ SESSION to replace set_socket_blocking () // use stream_set_blocking () to replace split () // use preg_split () to replace spliti () // use preg_split () with the 'I' modifier to replace SQL _regcase () mysql_db_query () // use mysql_select_db () and mysql_query () replace mysql_escape_string () // use mysql_real_escape_string () to replace mysql_close (); // disable all unsupported functions. you need to change it to mysql_close ($ link). discard the string-based region settings. use LC _ * series constants instead. the is_dst parameter of mktime. use the new time zone handler instead. PHP 5.4: mcrypt_generic_end () mysql_list_dbs () PHP 5.5: mcrypt_cbc () mcrypt_cfb () mcrypt_ecb () mcrypt_ofb ()

Among them, PHP 5.3 is the beginning of the waste function, many common old regular ereg all replace preg, but magic quotes. PHP 5.3 was removed after it was deprecated from PHP 5.4. This is a big change in PHP 5.3. PHP 5.4 has introduced many new features and many new special writing methods. (Bbs.it-home.org script School)

For PHP 5.5, the MYSQL extension is removed. we recommend that you use MYSQLI or PDO! If you use more than 5.5 programs, an error is reported, prompting that mysql_connect is about to expire !! The following error is displayed: Deprecated: mysql_connect (): the mysql extension is deprecated and will be removed in The future: use mysqli or PDO instead in E: testnew 6.php on line 6PHP5 is the biggest cross-step of class compared to 4, and the most influential is to discard these old habits. Although the version has been being upgraded, there are still a large number of 5.1.6-5.2.17 in the market. 5.3 began to discard many features, which led to the failure of many programs to directly launch.. a large number of open-source products were directly killed in seconds!

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.