is_a have been deprecated. You can simply replace all occurences with the new instanceOf operator, although this will break backwards-compatibility with php4.
![]() | 向后不兼容的改变尽管大部分 PHP 4 的代码应该不用修改就能运行,还是应该留意以下向后不兼容的改变:
![]()
01-Mar-2006 06:03
is_a have been deprecated. You can simply replace all occurences with the new instanceOf operator, although this will break backwards-compatibility with php4.
dward . maidencreek.com
02-Nov-2004 04:54
Another change that we've had problems with while trying to use PHP4 code in PHP5 is how $this is carried across static method calls if they are not declared static in PHP5. The main issue was that debug_backtrace() now shows the first class with -> instead of the second with :: in the backtrace element when the method in the second class was called statically (using ::) from a method in the first class.
08-Sep-2004 12:40
Be careful with array_merge in PHP5.1 not only a E_WARNING is thrown, but also the result is an empty array. So if you merge two select queries and the last one is empty you will end up with no array at all.
john.g
27-Aug-2004 01:45
PATH_TRANSLATED is handy when using Apache's ModRewrite engine, as it gives you the name and path of the resulting file rather than the one that was requested by the user. Since PHP 5.0 and Apache 2 no longer support this variable, I created a workaround by adding an environment variable to my ModRewrite command:
cyberhorse
06-Aug-2004 01:07
clone() is a php function now.
Justin Gehring
21-Jul-2004 04:34
One more thing that is not backwards compatible with PHP 5.0 (at least as far as we can tell) is the XSLT Sablotron librarys and the old DOM_XML librarys. Both have replacements, but translations will need to be made with either an alias class, or in the code itself.
jbeall /\t heraldic d0t us
15-Jul-2004 10:17
Another change that was made is the behavior when you try to reassign $this. | ![]() | ||||