From d13d821b8b44f764d0fcaa777d19cf0234b770e6 Mon Sep 17 00:00:00 2001 From: jim winstead Date: Sat, 20 Jan 2001 04:01:41 +0000 Subject: [PATCH] new incompatibilities appendix, using info from website git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@39866 c90b9560-bf6c-de11-be94-00142212c4b1 --- appendices/incompat.xml | 60 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 appendices/incompat.xml diff --git a/appendices/incompat.xml b/appendices/incompat.xml new file mode 100644 index 0000000000..1e4eca0989 --- /dev/null +++ b/appendices/incompat.xml @@ -0,0 +1,60 @@ + + Incompatibilities + + + Incompatibilities from PHP 3 to PHP 4 + + + Static variable and class member initializers only accept scalar values (in PHP 3.0 they accepted any valid expression). The impact should be small, since initializers with anything but a simple static value rarely make sense. + + + The scope of break and continue is local to that of an include'd file or an eval'd string. There should be virtually no impact for this incompatibility. + + + A return statement from a require'd file no longer works. It hardly worked in PHP 3.0, so the impact should be fairly small. If you want this functionality - use include instead. + + + unset is no longer a function, but a statement. It was never documented as a function, so the impact here will probably be non existent. + + + The following letter combination is not supported within encapsulated strings: "{$". If you have a string that includes this letter combination, for example, print "{$somevar"; (which printed the letter { and the contents of the variable $somevar in PHP 3.0), it will result in a parse error under Zend. In this case, you would have to change the code to print "\{$somevar"; This incompatability is due to the full variable reference within quoted strings feature added in Zend. + + + The function short_tags no longer works. There is no way to change PHP's short tags behavior in runtime, only by using configuration parameters (.htaccess variables would work well). + + + You can't use PHP 3 dynamic extensions (php3_*.dll on Windows) with PHP 4. + + + The string "0" is now considered empty. This is known to have an effect on phpMyAdmin. + + + In PHP 4, multiple calls to setcookie are performed in the order called, whereas in PHP 3 they were performed in reverse order. + + + unset now breaks the association between a locally scoped variable and one that is globally scoped if the reference is made using the "global" keyword. + + + Associative array subscripts should be quoted. If you fail to quote them, they will be interpreted as constants. This can cause unpredictable results when using keywords such as "NULL" as an unquoted array subscript. + + + + + + +