$Id$ UPGRADE NOTES - PHP 5.3 1. Reserved words and classes 2. Changes made to existing functions 3. Changes made to existing methods 4. Changes made to existing classes 5. Deprecated 6. Undeprecated 7. Extensions: a. moved out to PECL and actively maintained there b. no longer maintained c. with changed behaviour d. no longer possible to disable 8. Changes in SAPI support 9. Changes in INI directives 10. Syntax additions 11. Windows support 12. New in PHP 5.3: a. New libraries b. New extensions c. New stream wrappers d. New functions e. New global constants f. New classes g. New methods h. New class constants ============================= 1. Reserved words and classes ============================= - **namespace** and **goto** are now reserved keywords. - **Closure** is now a reserved class. (Used by lambda and closure.) ===================================== 2. Changes made to existing functions ===================================== - The array functions natsort(), natcasesort(), usort(), uasort(), uksort(), array_flip() and array_unique(), no longer accept objects passed as arguments. If you need to access their properties using an object, you will need to cast the objects to arrays first. - var_dump() output now includes private object members. - session_start() now returns FALSE when the session startup fails. - clearstatcache() no longer clears the realpath cache by default. - The filesystem functions opendir(), scandir() and dir() now use the default context if no context is passed as an argument to them. - The behaviour of functions with by-reference parameters called by value has changed. Where previously the function would accept the by-value argument, a warning is now emitted and all by-ref parameters are set to NULL. - There is now native support for the following math functions: asinh(), acosh(), atanh(), log1p() and expm1(). - In the GD extension, there is now pixelation support available through the imagefilter() function. - crypt() now has Blowfish and extended DES support, and crypt() features are now 100% portable. PHP has its own internal crypt implementation which drops into place when support for crypt or crypt_r() is not found. - get_cfg_var() is now able to return "array" INI options. - Stream wrappers can now be used by include_path(). - There are new parameters in: clearstatcache(): clear_realpath_cache and filename. copy(): context. fgetcsv(): escape. ini_get_all(): details. nl2br(): is_xhtml. parse_ini_file(): scanner_mode. round(): mode. stream_context_create(): params. strstr(), stristr(): before_needle. =================================== 3. Changes made to existing methods =================================== - The magic methods __get(), __set(), __isset(), __unset() and __call() should always be public and can no longer be static. Method signatures are enforced. - The __toString() magic method can no longer accept arguments. - There is a new magic method, __callStatic(). - count() vs count_elements() handler resolution rules have changed. (This could potentially break custom PHP extensions.) - The trailing / has been removed from SplFileInfo and other related directory classes. - SplFileInfo::getpathinfo() now returns information about the path name. - There are new parameters in: Exception::__construct(): previous. =================================== 4. Changes made to existing classes =================================== - SplObjectStorage now has ArrayAccess support. It is also now possible to store associative information with objects in SplObjectStorage. ============= 5. Deprecated ============= - Ticks: declare(ticks=N) and register_tick_function() both now trigger an E_DEPRECATED notice. - define_syslog_variables() is deprecated. - All ereg functions are deprecated. Use PCRE (preg_*()) instead. =============== 6. Undeprecated =============== - By popular request, is_a() is no longer marked deprecated. ============== 7. Extensions: ============== a. moved out to PECL and actively maintained there - fpdf - ming - ncurses b. no longer maintained - dbase - fbsql - msql - sybase (use sybase_ct, which is still in PHP core) c. with changed behaviour - hash: The SHA-224 hash algorithm is now supported. - oci8a: Calling oci_close() on a persistent connection, or on a variable that references a persistent connection going out of scope, will now roll back any uncommitted transaction. You should explicitly commit or rollback as needed. Setting oci8.old_oci_close semantics=On in php.ini gives the old behaviour. - openssl: There is now support for OpenSSL digest and cipher functions. It is also now possible to access the internal values of DSA, RSA and DH keys. - session: Sessions will no longer store session-files in "/tmp" where open_basedir restrictions apply, unless "/tmp" is explicitly added to the list of allowed paths. d. no longer possible to disable - PCRE - Reflection - SPL ========================== 8. Changes in SAPI support ========================== - FastCGI is now always enabled and can not be disabled. See sapi/cgi/CHANGES for more details. - A new CGI SAPI option, -T, can be used to measure execution time of a script repeated several times. - CGI/FastCGI now has support for .htaccess style user-defined php.ini files. ============================ 9. Changes in INI directives ============================ - zend.ze1_compatibility_mode has been removed. - A new user initialization mechanism and config variables have been added: user_ini.filename and user_ini.cache_ttl - There is now support for special sections: [PATH=/opt/httpd/www.example.com/] and [HOST=www.example.com]. Directives set in these sections cannot be overridden by user-defined INI files or at runtime. - Added mbstring.http_output_conv_mimetype. This directive specifies the regex pattern of content types for which mb_output_handler() is activated. - It is now possible to use the full path to load modules using the "extension" directive. - "ini-variables" can now be used almost anywhere in a php.ini file. - It is now possible to use alphanumeric or variable indices in ini option arrays. - Runtime tightening of open_basedir restrictions is now possible. ==================== 10. Syntax additions ==================== - NOWDOC is like HEREDOC but with single quotes: <<<'LABEL' ... Static HEREDOCs can be used to initialize static variables and class members or constants: static $foo = <<