php 5.3 从一方面来讲,可以说在07年计划PHP6的中的一个pre版本,增加了很多功能,统一了很多语法,使PHP变得更加强大与简洁。 可是我们在升级使用5.3以后会发现以前的旧项目会出现一些问题,统计架构规划,PHP当然会对一些别名,重复功能function进行归类整理,并把一些不用的正式在php 5.3以后删除掉.故不建议在新项目继续使用. PHP 5.3 有两个deprecated, E_DEPRECATED and E_USER_DEPRECATED 下面是旧的项目中会在php 5.3以后碰到的问题 call_user_method() 可以用 call_user_func() 替代 直接返加new 实例不再建议使用. PHP 6 将不再支持
define_syslog_variables
register_globals
register_long_arrays
safe_mode
magic_quotes_gpc
magic_quotes_runtime
magic_quotes_sybase
在PHP.ini 注释用#已经不再建议使用.
Deprecated functions:
call_user_method_array() 可以用 call_user_func_array() 替代define_syslog_variables()
dl() 反对在使用DL加载扩展,php5.3 以后应用php.ini配制
ereg() 可以用 preg_match() 替代
ereg_replace() 可以用 preg_replace() 替代
eregi() 用 preg_match() i 参数替代
eregi_replace() 用 preg_replace() i 参数替代
set_magic_quotes_runtime() 用 magic_quotes_runtime() 替代
session_register() session_unregister() session_is_registered()
以上三个统一用 $_SESSION 替代
set_socket_blocking() 用 stream_set_blocking() 替代
split() 用 preg_split() 替代
spliti() 用 preg_split() 模式 ‘i’ 替代
sql_regcase()
mysql_db_query() 用 mysql_select_db() mysql_query() 替代mysql_escape_string() 用 use mysql_real_escape_string() 替代
关于时区处理,统一用Timezone对像
Deprecated features:
Call-time pass-by-reference 参数现在不再建议使用 PHP 6 将不再支持
用 {} 访问字符串顺序不再建议使用. 统一用 [] 代替. PHP 6 将不再支持
详细解决方案
[转]php5.3(放弃的函数替换)deprecated 异常有关问题汇总
热度:488 发布时间:2012-11-06 14:07:00.0
相关解决方案
- Global access to Rake DSL methods is deprecated
- [转]php5.3(放弃的函数替换)deprecated 异常有关问题汇总
- Jquery 1.10 toggle() Deprecated 顶替方法
- spring 3.1.0源码中说The type XmlBeanFactory is deprecated,那用什么替代解决思路
- jsp 异常(sun.tools.javac.Main has been deprecated)
- Android系统编译异常Note: Some input files use or override a deprecated API. 解决方法
- php中“Deprecated: Function split() is deprecated in”异常解决方法
- [转]php5.3(放弃的函数替换)deprecated 异常有关问题汇总
- "Uses or overrides a deprecated API" in android compiling
- Passing non-integers as three-element position specification is deprecated since 3.3
- sys:1: FutureWarning: The error_bad_lines argument has been deprecated and will be removed in a futu
- PHP Deprecated: Comments starting with '#' are deprecated in *.ini 警告解决办法
- JavaEE进阶(12) 四大内置注解@Override、@Deprecated、@SuppressWarnings、@SafeVarargs
- 使用uuid报错:`const uuidv1 = require('uuid/v1');` is deprecated as of uuid@7.
- 使用指数与对数实现oracle 的乘法与除法@Deprecated
- nginx: [warn] the ssl directive is deprecated, use the listen ... ssl directive instead
- Java中的注解以及应用 @Deprecated @SupressWarning @Override
- Warning: $HADOOP_HOME is deprecated. hadoop1.0.4解决方法
- 解决C++警告:warning: conversion from string literal to 'char *' is deprecated
- Android - new BitmapDrawable deprecated 创建一个空白的drawable
- UserWarning: nn.Upsample is deprecated. Use nn.functional.interpolate instead
- react使用antd警告:Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance
- Passing functions, DOM objects to IPC methods is deprecated and will throw an exception
- 解决Ubuntu执行bash脚本Option “-e” is deprecated and might be removed
- fastadmin安装时出现错误Array and string offset access syntax with curly braces is deprecated
- rbac.authorization.k8s.io/v1beta1 RoleBinding is deprecated in v1.17+, unavailable in v1.22+;