doc:scratchpad:upgrade:53

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

doc:scratchpad:upgrade:53 [2009/06/14 18:43] – ze1_compatibility_mode = E_ERROR not E_WARNING philipdoc:scratchpad:upgrade:53 [2017/09/22 13:28] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== PHP 5.3 upgrading notes ====== ====== PHP 5.3 upgrading notes ======
-  * This document is work in progress, and eventually will live in the PHP Manual +  * This document has been removed in favor of [[http://cvs.php.net/viewvc.cgi/php-src/UPGRADING?view=markup&pathrev=PHP_5_3|UPGRADING]] and will eventually live in the PHP Manual (see below) 
-  * Add all information, changed behaviour or new features, much like [[http://php.net/migration52]] is for 5.2.0 +  * The 5.3.0 upgrade guide can be seen here: [[http://docs.php.net/migration53]] 
-  * See also [[doc:todo:undocumented]]+  * The 5.2.0 upgrade guide can be seen here: [[http://docs.php.net/migration52]] 
 +  * The 5.1.0 upgrade guide can be seen here: [[http://docs.php.net/migration51]]
  
- 
-===== Changes to the syntax which might break existing applications ===== 
- 
-  * [[http://docs.php.net/namespace|namespace]] is now a reserved word. Applications can't use //namespace// as identifier anymore. Doing so will create a Fatal Error while parsing the script. 
-  * //goto// is now a reserved keyword. Applications can't use //goto// as identifier anymore. Doing so will create a Fatal Error while parsing the script. 
-  * //Closure// is now a reserved class. (Used by lambda and closure) 
- 
-===== Changes to functions affecting backwards compatibility ===== 
- 
-  * The functions natsort, natcasesort, usort, uasort, uksort, array_flip, array_unique don't take objects anymore as parameters. For accessing their properties using this way you have to cast the objects to arrays first. 
-  * var_dump() output with objects (some internal classes emit internal states as private properties that are not accessible otherwise, for Example SimpleXML exposes its virtual properties) 
-  * session_start() now returns false if session startup fails for some reason. 
-  * clearstatcache() now defaults to not clear the realpath cache. 
-  * opendir(), scandir() and dir() now use the default context if no context passed. 
-  * If a function with by-reference parameters is called by value ( for example with [[http://php.net/call_user_func_array|call_user_func_array]]) a warning message is produced and all by-reference parameters are set to NULL. In older versions, the function was called with by value parameters. 
-  * call_user_func now propagates $this even if the callee is the parent class (cf #47402) 
-  * The new mysqlnd library necessitates using [[http://dev.mysql.com/doc/refman/5.0/en/password-hashing.html|MySQL's newer 41 byte password format]]. Continued use of the old 16 byte passwords will cause mysql_connect() to produce the following error message: "mysqlnd cannot connect to MySQL 4.1+ using old authentication." 
- 
-===== Changes to method signatures affecting backwards compatibility ===== 
- 
-  * %%__get, __set, __isset, __unset, __call%% magic methods should be public now and can not be static, argument signatures enforced 
-  * %%__toString%% magic method can not accept parameters 
-  * %%__callStatic%% is a new magic method 
-  * %%count() vs count_elements%% handler resolution rules change (might break custom PHP exts not in PECL/php-src) 
-  * %%__invoke%% %%('class fail { function __invoke() { echo "hello world\n"; } } $o = new fail; $o();' // hello world)%% 
- 
- 
-===== Changes to binary releases for Windows ===== 
- 
-  * The minimum Windows versions are now windows 2000/XP (windows 98, ME or NT4 are not supported anymore) 
-  * Binaries target 586 or later, i386, i486 are not supported (was already the case before but not mentioned in the manual) 
-  * Binaries now support hardlinks (in *all* versions, from Windows 2000), Windows Vista / Server 2008 supports symbolic links, attempting to use the symbolic link functions on a system that doesn't support symbolic links will emit a warning 
- 
-===== Libraries added ===== 
-  * mysqlnd (optional replacement for libmysql) 
- 
-===== Extensions added ===== 
-  * [[http://docs.php.net/fileinfo|Fileinfo]] 
-  * [[http://docs.php.net/intl|Intl]] 
-  * [[http://docs.php.net/phar|Phar]] 
-  * [[http://docs.php.net/sqlite3|SQLite3]] 
- 
-===== Extensions removed ===== 
-==== Moved to PECL and maintained there ==== 
-  * ncurses (maintained) 
-  * fpdf (maintained) 
-  * dbase 
-  * fbsql 
-  * ming 
-  * msql 
- 
-==== Not maintained and superseded  ==== 
-  * sybase (please use sybase_ct which is maintained and still in core) 
- 
-===== Extension Changes Causing Incompatibilities ===== 
- 
-==== OCI8  ==== 
-  * Oci_close() on a persistent connection, or all variables referencing a persistent connection going out of scope, now rolls back any uncommitted transaction.  Make sure you explicitly commit or rollback as needed.  Alternatively, setting oci8.old_oci_close_semantics to On gives the old behavior where oci_close() is a no-op for all types of connection. 
- 
-==== Session  ==== 
-  * Sessions would no longer succeed to store session-files in "/tmp" path if open_basedir restriction is enabled, and "/tmp" is not explicitly added to allowed paths list (special treatment of "/tmp" was added in 5.2.2, but was not documented) 
-===== Deprecated  ===== 
-  * Ticks (declare(ticks=N) and [[http://docs.php.net/register-tick-function|register_tick_function()]] now issues ''E_DEPRECATED'') 
-  * define_syslog_variables() now issues ''E_DEPRECATED'' 
-  * all ereg functions now issues ''E_DEPRECATED'' (note that not all of them are prefixed with ereg) 
-    * ereg_replace() 
-    * ereg() 
-    * eregi_replace() 
-    * eregi() 
-    * split() 
-    * spliti() 
-    * sql_regcase() 
-  * Deprecated features (safe_mode, register_globals, register_long_arrays, magic_quotes_gpc, magic_quotes_sybase & magic_quotes_runtime) will now issue an ''E_DEPRECATED'' if its turned on at startup 
-  * zend.ze1_compatibility_mode will now issue an ''E_ERROR'' if it's turned on at startup 
- 
-===== Undeprecated ===== 
-  * [[http://docs.php.net/is-a|is_a()]] ([[http://docs.php.net/manual/en/language.operators.type.php|this page]] says "[...] but is_a() has since been deprecated in favor of instanceof.") 
- 
-===== Changes to .INI settings ===== 
-  * Removed zend_extension_debug and zend_extension_ts, zend_extension directive is used to load all Zend Extensions. 
-  * Removed zend.ze1_compatibility_mode. 
-  * user_ini.filename user-initialization mechanism and config variables: user_ini.filename and user_ini.cache_ttl. 
-  * Added support for special [PATH=/opt/httpd/www.example.com/] and [HOST=www.example.com] sections. Directives set in these sections can not be overridden by user-defined ini-files or during runtime. 
-  * Added mbstring.http_output_conv_mimetype that specifies the regex pattern of content types for which mb_output_handler() is activated. 
-  * Allowed using full path to load modules using "extension" directive. 
-  * Allowed "ini-variables" to be used almost everywhere ini php.ini files. 
-  * Allowed using alphanumeric/variable indexes in "array" ini options. 
-  * Allowed run-time tightening of open_basedir (http://docs.php.net/manual/en/ini.sect.safe-mode.php#ini.open-basedir) 
- 
-===== No longer allow to disable ===== 
-  * PCRE 
-  * Reflection 
-  * SPL 
-===== New parameters ===== 
- 
-** Filesystem ** 
-  * [[http://docs.php.net/fgetcsv|fgetcsv()]]: Added ''escape''. 
-  * [[http://docs.php.net/copy|copy()]]: Added ''context''. 
-  * [[http://docs.php.net/parse_ini_file|parse_ini_file()]]: Added ''scanner_mode''. 
-  * [[http://docs.php.net/clearstatcache|clearstatcache()]]: Added ''clear_realpath_cache'' and ''filename''. 
- 
-** Info ** 
-  * [[http://docs.php.net/ini-get-all|ini_get_all()]]: Added ''details''. 
- 
-** JSON ** 
-  * [[http://docs.php.net/json_encode|json_encode()]]: Added  ''options''. 
- 
-** Math ** 
-  * [[http://docs.php.net/round|round()]]: Added ''mode''. 
- 
-** Streams ** 
-  * [[http://docs.php.net/stream_context_create|stream_context_create()]]: Added ''params''. 
- 
-** Strings ** 
-  * [[http://docs.php.net/strstr|strstr()]], [[http://docs.php.net/stristr|stristr()]]: Added ''before_needle''. 
-  * [[http://docs.php.net/nl2br|nl2br()]]: Added ''is_xhtml''. 
- 
-** Exceptions ** 
-  * [[http://www.php.net/manual/en/exception.construct.php|Exception::__construct()]]: Added ''previous''. 
-===== New functions ===== 
- 
-** Array ** 
-  * array_replace() 
-  * array_replace_recursive() 
- 
-** Date ** 
-  * [[http://docs.php.net/date_add|date_add()]] 
-  * [[http://docs.php.net/date_sub|date_sub()]] 
-  * date_diff() 
-  * date_parse_from_format() 
-  * date_create_from_format() 
-  * date_get_last_errors() 
-  * [[http://docs.php.net/timezone_version_get|timezone_version_get()]] 
- 
-** Filesystem ** 
-  * **Now with Windows support:** 
-    * [[http://docs.php.net/fnmatch|fnmatch()]] 
-    * [[http://docs.php.net/link|link()]] 
-    * [[http://docs.php.net/lstat|lstat()]] 
-    * [[http://docs.php.net/linkinfo|linkinfo()]] 
-    * [[http://docs.php.net/readlink|readlink()]] 
-    * [[http://docs.php.net/symlink|symlink()]] 
-  * [[http://docs.php.net/parse_ini_string|parse_ini_string()]] 
- 
-** GMP ** 
-  * [[http://docs.php.net/gmp_testbit|gmp_testbit()]] 
- 
-** Hash ** 
-  * [[http://docs.php.net/hash-copy|hash_copy()]] 
- 
-** JSON ** 
-  * [[http://docs.php.net/json_last_error|json_last_error()]] 
- 
-** Image ** 
-  * **Now with Windows support:** 
-    * [[http://docs.php.net/imagecolorclosesthwb|imagecolorclosesthwb()]] 
- 
-** Math ** 
-  * **Now with native support:** 
-    * [[http://docs.php.net/asinh|asinh()]] 
-    * [[http://docs.php.net/acosh|acosh()]] 
-    * [[http://docs.php.net/atanh|atanh()]] 
-    * [[http://docs.php.net/log1p|log1p()]] 
-    * [[http://docs.php.net/expm1|expm1()]] 
- 
-** Misc ** 
-  * **Now with Windows support:** 
-    * [[http://docs.php.net/time_nanosleep|time_nanosleep()]] 
-    * [[http://docs.php.net/time_sleep_until|time_sleep_until()]] 
- 
-** MySQLi ** 
-  * mysqli_fetch_all() 
-  * mysqli_get_connection_stats() 
-  * mysqli_poll() 
-  * mysqli_reap_async_query() 
- 
-** Mcrypt ** 
-  * **Now with Windows support:** 
-    * [[http://docs.php.net/mcrypt_create_iv|mcrypt_create_iv()]] 
- 
-** Network ** 
-  * header_remove() 
-  * gethostname() 
-  * **Now with Windows support:** 
-    * [[http://docs.php.net/getmxrr|getmxrr()]] 
-    * [[http://docs.php.net/checkdnsrr|checkdnsrr()]] 
-    * [[http://docs.php.net/dns_get_record|dns_get_record()]] 
-    * [[http://docs.php.net/inet_ntop|inet_ntop()]] 
-    * [[http://docs.php.net/inet_pton|inet_pton()]] 
- 
-** OpenSSL ** 
-  * openssl_random_pseudo_bytes() 
- 
-** PCNTL ** 
-  * [[http://docs.php.net/pcntl_signal_dispatch|pcntl_signal_dispatch()]] 
-  * [[http://docs.php.net/pcntl_sigprocmask|pcntl_sigprocmask()]] 
-  * [[http://docs.php.net/pcntl_sigwaitinfo|pcntl_sigwaitinfo()]] 
-  * [[http://docs.php.net/pcntl_sigtimedwait|pcntl_sigtimedwait()]] 
- 
-** PCRE ** 
-  * preg_filter() 
- 
-** PHP Core ** 
-  * **Now with Windows support:** 
-    * getopt() 
-  * gc_collect_cycles() 
-  * gc_enabled() 
-  * gc_enable() 
-  * gc_disable() 
-  * class_alias() 
-  * [[http://docs.php.net/get_called_class|get_called_class()]] 
-  * get_extension_funcs() 
-  * forward_static_call() 
-  * forward_static_call_array() 
-  * [[http://docs.php.net/str-getcsv|str_getcsv()]] 
-  * quoted_printable_encode() 
- 
-** SHM **  
-  * [[http://docs.php.net/msg_queue_exists|msg_queue_exists()]] 
- 
-** Sockets ** 
-  * **Now with Windows support (again):** 
-    * socket_create_pair() 
- 
-** SPL ** 
-  * trailing / removed from SplFileInfo and other related directory classes 
-  * [[http://docs.php.net/manual/en/splfileinfo.getpathinfo.php|SplFileInfo::getpathinfo()]] returns info on the pathname 
- 
-** Streams ** 
-  * [[http://docs.php.net/stream_supports_lock|stream_supports_lock()]] 
-  * [[http://docs.php.net/stream_context_set_default|stream_context_set_default()]] 
-  * **Now with Windows support:** 
-    * [[http://docs.php.net/stream_socket_pair|stream_socket_pair()]] 
- 
-** Strings ** 
-  * [[http://docs.php.net/lcfirst|lcfirst()]] 
-  
- 
-===== New methods ==== 
- 
-** Date ** 
-  * [[http://docs.php.net/manual/en/datetime.diff.php|DateTime::diff()]] 
-  * [[http://docs.php.net/manual/en/datetime.add.php|DateTime::add()]] 
-  * [[http://docs.php.net/manual/en/datetime.sub.php|DateTime::sub()]] 
-  * [[http://docs.php.net/manual/en/datetime.createfromformat.php|DateTime::createFromFormat()]] 
-  * [[http://docs.php.net/manual/en/datetime.getlasterrors.php|DateTime::getLastErrors()]] 
- 
-** PDO/Firebird ** 
-  * [[http://docs.php.net/manual/en/pdo.setattribute.php|PDO::setAttribute()]] 
- 
-** Reflection ** 
-  * [[http://docs.php.net/manual/en/language.oop5.reflection.php#language.oop5.reflection.reflectionproperty|ReflectionProperty::setAccessible()]] 
-  * ReflectionFunction::inNamespace() 
-  * ReflectionFunction::getNamespaceName() 
-  * ReflectionFunction::getShortName() 
-  * ReflectionClass::inNamespace() 
-  * ReflectionClass::getNamespaceName() 
-  * ReflectionClass::getShortName() 
- 
-** XSL ** 
-  * [[http://docs.php.net/manual/en/xsltprocessor.setprofiling.php|XSLTProcessor::setProfiling()]] 
- 
- 
- 
-===== New classes ===== 
- 
-** Date ** 
-  * DateInterval 
-  * DatePeriod 
- 
-** Phar ** 
-  * [[http://docs.php.net/manual/en/class.Phar.php|Phar]] 
-  * [[http://docs.php.net/manual/en/class.PharData.php|PharData]] 
-  * [[http://docs.php.net/manual/en/class.PharFileInfo.php|PharFileInfo]] 
-  * [[http://docs.php.net/manual/en/class.PharException.php|PharException]] 
- 
-** SPL ** 
-  * [[http://docs.php.net/manual/en/class.spldoublylinkedlist.php|SplDoublyLinkedList]] 
-  * [[http://docs.php.net/manual/en/class.splstack.php|SplStack]] 
-  * [[http://docs.php.net/manual/en/class.splqueue.php|SplQueue]] 
-  * [[http://docs.php.net/manual/en/class.splheap.php|SplHeap]] 
-  * [[http://docs.php.net/manual/en/class.splminheap.php|SplMinHeap]] 
-  * [[http://docs.php.net/manual/en/class.splmaxheap.php|SplMaxHeap]] 
-  * [[http://docs.php.net/manual/en/class.splpriorityqueue.php|SplPriorityQueue]] 
-  * SplFixedArray 
-  * FilesystemIterator 
-  * GlobIterator 
-  * RecursiveTreeIterator 
-  * MultipleIterator 
- 
-===== New global constants ===== 
- 
-** Filesystem ** 
-  * INI_SCANNER_NORMAL 
-  * INI_SCANNER_RAW 
- 
-** GD ** 
-  * IMG_FILTER_PIXELATE 
- 
-** JSON ** 
-  * JSON_ERROR_NONE 
-  * JSON_ERROR_DEPTH 
-  * JSON_ERROR_STATE_MISMATCH 
-  * JSON_ERROR_CTRL_CHAR 
-  * JSON_ERROR_SYNTAX 
- 
-** LDAP ** 
-  * LDAP_OPT_NETWORK_TIMEOUT 
- 
-** PCRE ** 
-  * [[http://docs.php.net/manual/en/pcre.constants.php|PREG_BAD_UTF8_OFFSET_ERROR]] 
- 
-** PHP Core ** 
-  * [[http://docs.php.net/manual/en/errorfunc.constants.php#errorfunc.constants.errorlevels.e-deprecated-error|E_DEPRECATED]] 
-  * [[http://docs.php.net/manual/en/errorfunc.constants.php#errorfunc.constants.errorlevels.e-deprecated-error|E_USER_DEPRECATED]] 
-  * [[http://docs.php.net/manual/en/language.constants.predefined.php|__DIR__]] 
-  * [[http://docs.php.net/manual/en/language.constants.predefined.php|__NAMESPACE__]] 
- 
-** PCNTL ** 
-  * "how" argument in [[http://docs.php.net/pcntl_sigprocmask|pcntl_sigprocmask()]] 
-    * SIG_BLOCK 
-    * SIG_UNBLOCK 
-    * SIG_SETMASK 
-  * Value of "code" in the argument "info" set by reference by pcntl_sigwaitinfo() and pcntl_sigtimedwait() 
-    * SI_USER 
-    * SI_NOINFO 
-    * SI_KERNEL 
-    * SI_QUEUE 
-    * SI_TIMER 
-    * SI_MESGQ 
-    * SI_ASYNCIO 
-    * SI_SIGIO 
-    * SI_TKILL 
-    * CLD_EXITED 
-    * CLD_KILLED 
-    * CLD_DUMPED 
-    * CLD_TRAPPED 
-    * CLD_STOPPED 
-    * CLD_CONTINUED 
-    * TRAP_BRKPT 
-    * TRAP_TRACE 
-    * POLL_IN 
-    * POLL_OUT 
-    * POLL_MSG 
-    * POLL_ERR 
-    * POLL_PRI 
-    * POLL_HUP 
-    * ILL_ILLOPC 
-    * ILL_ILLOPN 
-    * ILL_ILLADR 
-    * ILL_ILLTRP 
-    * ILL_PRVOPC 
-    * ILL_PRVREG 
-    * ILL_COPROC 
-    * ILL_BADSTK 
-    * FPE_INTDIV 
-    * FPE_INTOVF 
-    * FPE_FLTDIV 
-    * FPE_FLTOVF 
-    * FPE_FLTUND 
-    * FPE_FLTRES 
-    * FPE_FLTINV 
-    * FPE_FLTSUB 
-    * SEGV_MAPERR 
-    * SEGV_ACCERR 
-    * BUS_ADRALN 
-    * BUS_ADRERR 
-    * BUS_OBJERR 
- 
-===== New class constants ===== 
- 
-** PDO/Firebird ** 
-  * PDO::FB_ATTR_DATE_FORMAT 
-  * PDO::FB_ATTR_TIME_FORMAT 
-  * PDO::FB_ATTR_TIMESTAMP_FORMAT 
- 
-===== New stream wrappers ===== 
- 
-** Phar ** 
-  * Phar stream wrapper for accessing phar archives 
- 
-** Streams ** 
-  * Added "glob" stream wrapper 
- 
-===== Other information ===== 
- 
-** GD ** 
-  * Added pixelation support through imagefilter() 
- 
-** Hash ** 
-  * Added sha224 hash algorithm to the hash extension.  
- 
-** OpenSSL ** 
-  * Added support for OpenSSL digest and cipher functions. 
-  * Added access to internal values of DSA, RSA and DH keys. 
- 
-** PHP Core ** 
-  * crypt() 
-    * Added Blowfish and extended DES support. 
-    * ** Made crypt features 100% portable. ** 
-      * MD5 crypt, standard DES, extended DES as well as the new Blowfish algorithms are not always available. PHP contains its own implementation and will use it as soon as libc's libcrypt is lacking any of them or the crypt_r function 
-  * Fixed get_cfg_var() to be able to return "array" ini options. 
- 
-** SAPI ** 
-  * FastCGI is now always enabled and can not be disabled. (See sapi/cgi/CHANGES for more details) 
-  * Added CGI SAPI -T option which can be used to measure execution time of script repeated several times.  
-  * Added ".htaccess" style user-defined php.ini files support for CGI/FastCGI. 
- 
-** SPL ** 
-  * Added ArrayAccess support to SplObjectStorage. 
-  * Added ability to store associative information with objects in SplObjectStorage. 
- 
-** Streams ** 
-  * Added ability to use stream wrappers in include_path. 
- 
-** Windows Support ** 
-  * Improve portability of stat, touch, filemtime, filesize and related functions (100% portable for the available data) 
-  * The PDO_OCI php_pdo_oci8.dll library (for use with Oracle version 8 client libraries) is no longer being built.  Instead, use php_pdo_oci.dll (note no '8') with Oracle 10 or 11 client libraries.  Connection to other database versions is supported. 
-  * For the OCI8 extension, a new library php_oci8_11g.dll is available in addition to php_oci8.dll.  Only one can be enabled at any time. Use php_oci8.dll with Oracle 10.2 client libraries.  Use php_oci8_11g.dll with Oracle 11 client libraries.  Connection to other database versions is supported. 
- 
-===== New syntactic sugar ===== 
-** [[http://docs.php.net/manual/en/language.types.string.php#language.types.string.syntax.nowdoc|NOWDOC]] ** 
-  * ''%%<<<'LABEL' ...%%'' 
-** HEREDOC with double quotes ** 
-  * ''%%<<<"LABEL" ...%%'' 
-** Static HEREDOCs can now be used to initialize static variables and class members or constants (like NOWDOC) ** 
-  * <code>static $foo = <<<LABEL 
-No variables here... 
-LABEL;</code> 
-** ?: operator ** 
-  * var_dump(0 ?: 'Hello!'); // string(6) "Hello!" 
doc/scratchpad/upgrade/53.1245005038.txt.gz · Last modified: 2017/09/22 13:28 (external edit)