什么是php5.5.0? 升级要慎重.
官网上有一段描述, 表达到php5.4之后的将会有如下变更:
Changes that affect compatibility:
1 Register globals, magic quotes and safe mode were removed
2 The break/continue $var syntax was removed
3 The ini option allow_call_time_pass_reference was removed
4 The PHP default_charset is now "UTF-8"
5 Safety modification regular symbol /e
上面几条是最影响php程序运行的, 许多旧版程序在第一条变更条件下都运行不起来. 全局注册及自动转义判断. 新版本的discuz x3已经修复了这种问题, 在使用函数前, 先判断函数是否可用了.
2,3,4 都是无关紧要的变更, 对程序运行影响不大.
第5条会影响更多, 95%的php代码都有此问题. 当你运行程序时, php会提示:
The /e modifier is deprecated, use preg_replace_callback instead
建议你转向使用preg_replace_callback函数.
还有些细节问题, 比如短标签默认关闭, 增加匿名函数, 去掉了zend解密功能(这对shopex是致命伤).