PHP 5.3 后被禁止使用的函数
很久没写博客。最近还是在做Meeplace的Custom works以及2.9版的工作。同时着手准备我们的新项目Meesocial。目前不能透露内容,大家敬请期待吧。。。
今天在MacOS上安装了5.3版的PHP,结果是:对于Meeplace 2.8(调试环境)在一些页面下会警告错误。(产品级不会有警告)。查询后得知PHP5.3已经禁止了一些函数的使用,或者将其更名。在Meeplace 2.9中将兼容PHP 5.3。
官网上的说明:http://cn2.php.net/manual/en/migration53.deprecated.php
下面摘抄PHP5.3被禁止的函数
Deprecated functions:
- call_user_method() (use call_user_func() instead)
- call_user_method_array() (use call_user_func_array()instead)
- define_syslog_variables()
- dl()
- ereg() (use preg_match() instead)
- ereg_replace() (use preg_replace() instead)
- eregi() (use preg_match() with the ‘i’ modifier instead)
- eregi_replace() (use preg_replace() with the ‘i’ modifier instead)
- set_magic_quotes_runtime() and its alias,magic_quotes_runtime()
- session_register() (use the $_SESSION superglobal instead)
- session_unregister() (use the $_SESSION superglobal instead)
- session_is_registered() (use the $_SESSION superglobal instead)
- set_socket_blocking() (use stream_set_blocking() instead)
- split() (use preg_split() instead)
- spliti() (use preg_split() with the ‘i’ modifier instead)
- sql_regcase()
- mysql_db_query() (use mysql_select_db() andmysql_query() instead)
- mysql_escape_string() (use mysql_real_escape_string()instead)
- Passing locale category names as strings is now deprecated. Use the LC_* family of constants instead.
- The is_dst parameter to mktime(). Use the new timezone handling functions instead.