diff options
author | Dmitry Stogov <dmitry@php.net> | 2006-03-30 07:54:53 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2006-03-30 07:54:53 +0000 |
commit | 8fbc029247c979bf8f5e676b7c9565a448707af2 (patch) | |
tree | f7df804a5a52f757af6798092d406e9fea5392cc /README.UPDATING_TO_PHP6 | |
parent | 66287d9fb6b4acf342f5fb3132d1f933184b87cb (diff) | |
download | php-git-8fbc029247c979bf8f5e676b7c9565a448707af2.tar.gz |
Describe registr_long_arrays, ze1_compatibility_mode, dl(), E_ALL/E_STRICT
Diffstat (limited to 'README.UPDATING_TO_PHP6')
-rw-r--r-- | README.UPDATING_TO_PHP6 | 58 |
1 files changed, 56 insertions, 2 deletions
diff --git a/README.UPDATING_TO_PHP6 b/README.UPDATING_TO_PHP6 index 1569fd7f22..5803f9a87e 100644 --- a/README.UPDATING_TO_PHP6 +++ b/README.UPDATING_TO_PHP6 @@ -9,7 +9,11 @@ applications to support PHP6. 1.1 Functions and function aliases 1.2 Register globals 1.3 Magic quotes - 1.4 References + 1.4 Register long arrays ($HTTP_*_VARS) + 1.5 ZE1 compatibility mode + 1.6 dl() function + 1.7 E_ALL and E_STRICT constants + 1.8 References 2. Unicode (see README.UNICODE-UPGRADES) 2. Extensions 2.1 GD @@ -108,7 +112,57 @@ function session_unregister($name) { 1.3 Magic quotes ------------ -1.4 References +1.4 Register long Arrays ($HTTP_*_VARS) + ----------------------------------- + +register_long_arrays and the long versions of super globals had been removed. +PHP will emit E_CORE_ERROR during PHP startup if it would detect +register_long_arrays setting. + +You can emulate long arrays by including the following file: + +<?php +if (!ini_get('register_globals')) { + $HTTP_POST_VARS =& $_POST; + $HTTP_GET_VARS =& $_GET; + $HTTP_COOKIE_VARS =& $_COOKIE; + $HTTP_SERVER_VARS =& $_SERVER; + $HTTP_ENV_VARS =& $_ENV; + $HTTP_FILES_VARS =& $_FILES; +} +?> + +1.5 ZE1 compatibility mode + ---------------------- + +ZE1 compatibility mode (PHP4 object model) was introduced to migrate from PHP4 +to PHP5 in an easier way, but it never keeped 100% compatibility. +It is completly removed in PHP6, and there is no way to emulate it. +Applications should assume PHP5/PHP6 object model. + +1.6 dl() function + ------------- + +Now dl() function is supported only in CLI, CGI and EMBED SAPI. +There is no way to emulte it. You can just check if dl() is supported by SAPI: + +<?php +if (!function_exists("dl")) { + die("dl() function is required\n!"); +} +?> + +1.7 E_ALL and E_STRICT constants + ---------------------------- + +Now E_ALL error reporting mask includes E_STRICT. +You can filter E_STRICT error messages using the following code: + +<?php +error_reporting(error_reporting() & ~E_STRICT); +?> + +1.8 References ---------- <TODO: Derick plans to clean the reference mess in php6> |