将php4/mysql4迁移到php5/mysql5:预期的php问题? [英] Migrating php4/mysql4 to php5/mysql5: expected php issues?

查看:67
本文介绍了将php4/mysql4迁移到php5/mysql5:预期的php问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个遗留的Web应用程序php4/mysql4(MyISAM,数据库包含一些cms,一些用户数据,一些日历应用程序).现在,我将使用php5/mysql5迁移到新服务器.

I have a legacy web application php4/mysql4 (MyISAM, db contains some cms, some user data, some calendar application). Now I am going to migrate to a new server with php5/mysql5.

在这样的迁移场景中,典型的php问题是什么(php,sql查询等)?

What are the typical php issues in such a migration scenary (php, sql queries, anything)?

我听说传递的函数参数已更改,即按引用调用/按值调用.你能举个例子或解释一下吗?

I've heard that the function parameter passing changed, call-by-reference / call-by-value. Can you give an example or explain?

还有什么我应该知道的吗?

Anything else I should be aware of?

(MySQL问题涵盖在另一个问题中:将php4/mysql4迁移到php5/mysql5:切换到InnoDB吗?)

(The mysql issues are covered in a different question: Migrating php4/mysql4 to php5/mysql5: switch to InnoDB?)

推荐答案

大多数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.

这篇关于将php4/mysql4迁移到php5/mysql5:预期的php问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆