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.
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?
(The mysql issues are covered in a different question: Migrating php4/mysql4 to php5/mysql5: switch to InnoDB?)
解决方案
Most of the PHP 4/5 compatibility issues are two things:
new reserved words
new class/object backend
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).
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.