且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将php4/mysql4迁移到php5/mysql5:预期的php问题?

更新时间:2023-01-31 17:44:49

大多数PHP 4/5兼容性问题是两件事:

Most of the PHP 4/5 compatibility issues are two things:

  • 新保留字
  • 新类/对象后端

大多数v4代码将在v5中正常运行.您可能会遇到问题的地方是取决于v4的类模型的限制或利用v4的参考怪癖的代码.但是大多数人并没有超出这些限制(我有-这就是为什么我知道他们在那里的原因).

Most v4 code will run just fine in v5. Where you are likely to run up against problems is code that depends on the limitations of v4's class model or takes advantage of v4's reference quirks. But most people don't code up against those limits (I have - that's why I know they're there).

如果您受限于类/对象限制,则可以在"v1"模式下运行Zend引擎,这会使类和对象的行为像在v4中一样. 已记录.

If you are stuck with the class/object limits, you can run the Zend engine in a "v1" mode which makes the classes and objects behave like in v4. This is documented.