From 7c342c241d399e3a2f8a99343dd4d3878649bfaf Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Fri, 30 Jan 2004 23:14:46 +0000 Subject: [PATCH] added backward incompatible changes. Missing some examples for clarification now git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@150186 c90b9560-bf6c-de11-be94-00142212c4b1 --- appendices/migration5.xml | 53 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 4 deletions(-) diff --git a/appendices/migration5.xml b/appendices/migration5.xml index 826a19b93f..c306dbec78 100755 --- a/appendices/migration5.xml +++ b/appendices/migration5.xml @@ -1,5 +1,5 @@ - + Migrating from PHP 4 to PHP 5 @@ -20,9 +20,54 @@
Backward Incompatible Changes - Although most existing PHP 4 code should work without changes, you shoud - pay attention to this backward imcompatible changes: - + Although most existing PHP 4 code should work without changes, you should + pay attention to this backward imcompatible changes: + + + + strrpos and strripos now use + the entire string as a needle. + + + Ilegal use of string offsets causes E_ERROR instead + of E_WARNING. + + + array_merge was changed to accept only arrays. If a + non-array variable is passed, a E_WARNING will be + thrown for every such parameter. Be careful because your code may start + emitting E_WARNING out of the blue. + + + PATH_TRANSLATED server variable is no longer set implicitly under + Apache2 SAPI in contrast to the situation in PHP 4, where it is set to + the same value as the SCRIPT_FILENAME server variable when it is not + populated by Apache. This change was made to comply with the CGI specification. Please refer to bug #23610 for further information. + + + The T_ML_CONSTANT constant is no longer defined by + the Tokenizer extension. If + error_reporting is set to E_ALL, PHP will generate a + notice. Instead of T_ML_CONSTANT for /* */ the + T_COMMENT constant is used, thus both // and /* */ + are resolved as the T_COMMENT constant. However the + PHPDoc style comments /** */ ,which starting PHP5 are parsed by PHP, are + recongnized as T_DOC_COMMENT. + + + $_SERVER should be populated with argc and argv if variables_order + includes "S". If you have specifically configured your system to not + create $_SERVER, then of course it shouldn't be there. The change was to + always make argc and argv available in the CLI version regardless of the + variables_order setting. As in, the CLI version will now always populate + the global $argc and $argv variables. + + + Classes must be declared before used. + +