PHP5.3 abandon function substitution? Call_user_method () (use call_user_func () instead )???? Call_user_method_array () (replace call_user_func_array )???? Defi PHP5.3 deprecated functions
? Call_user_method () (use call_user_func)
???? Call_user_method_array () (use call_user_func_array)
???? Define_syslog_variables ()
???? Dl ()
???? Ereg () (use preg_match () instead)
???? Ereg_replace () (use preg_replace)
???? Eregi () (replaced by preg_match () and 'I' modifier)
???? Eregi_replace () (use preg_replace () in combination with the 'I' modifier)
???? Set_magic_quotes_runtime () and its alias function ?? Magic_quotes_runtime ()
???? Session_register () (use $ _ SESSION to replace all variables)
???? Session_unregister () (use $ _ SESSION to replace all variables)
???? Session_is_registered () (use $ _ SESSION to replace all variables)
???? Set_socket_blocking () (use stream_set_blocking)
???? Split () (use preg_split () instead)
???? Spliti () (replaced by preg_split () and 'I' modifier)
???? SQL _regcase ()
???? Mysql_db_query () (use mysql_select_db () and ?? Replace mysql_query)
???? Mysql_escape_string () (use mysql_real_escape_string)
???? The name of the region passed by the string is discarded. use the LC _ * series constant instead.
???? The is_dst parameter of mktime (). it is replaced by the new time zone handler.
The main function migration involved is as follows:
Delete function define_syslog_variables reference delete reference to function define_syslog_variables use constant LOG_USER, LOG_USER ,... Substitution
Ereg and eregi functions replace these functions with the preg_match function. int ereg (string $ pattern, string $ string [, array & $ regs]) int eregi (string $ pattern, string $ string [, array & $ regs]) intpreg_match (string $ pattern, string $ subject [, array & $ matches [, int $ flags [, int $ offset]) although the first parameter of the three is a string that represents a regular expression, preg_match uses PCRE (Perl-compatible regular expression syntax): the two ends of the regular expression use a symbol as the boundary, for example, "/pattern/" or "# pattern #", eregi is case-insensitive. For preg_match, the first parameter is case-sensitive, such as "/pattern/I" or "# pattern # I ", the matching data structure returned by the third parameter is different. After the third parameter of ereg is called, an array of complete and sub-matched strings is returned. Preg_match returns a two-dimensional array, which is equivalent to the string in the string array of ereg. the string in preg_match is an array that stores the matching values and locations respectively. If you want to perform multiple matches, PHP provides the preg_match_all function, and the return value of the third parameter is a three-dimensional array.
The ereg_replace and eregi_replace functions use the preg_replace function or the str_replace function to replace the preg_match function with the previous ereg. The first parameter must be converted, and a symbol is added at the beginning and end, for example: "/pattern/" or "# pattern #",... Replace eregi_replace to preg_replace, and add the regular expression parameter after the first parameter. For example, "/pattern/I" or "# pattern # I ",... If the first parameter of ereg_replace is not a regular expression, replace it directly with str_replace.
The spliti function replaces the split string with the explode function or the preg_split function. if you do not need to use a regular expression, it is best to replace explode with the fastest speed. if you use a regular expression to split a string, use the preg_split function instead. The substitution process is similar to ereg/ereg_replace. it is only used in the first regular expression parameter to add a PCRE separator before and after the split regular expression.