2014-12-27 19:56:39 +00:00
|
|
|
$Id$
|
2005-11-22 23:49:13 +00:00
|
|
|
|
2012-03-05 20:14:04 +00:00
|
|
|
PHP X.Y UPGRADE NOTES
|
|
|
|
|
|
|
|
1. Backward Incompatible Changes
|
|
|
|
2. New Features
|
2014-05-01 10:27:38 +00:00
|
|
|
3. Changes in SAPI modules
|
|
|
|
4. Deprecated Functionality
|
|
|
|
5. Changed Functions
|
|
|
|
6. New Functions
|
|
|
|
7. New Classes and Interfaces
|
|
|
|
8. Removed Extensions
|
|
|
|
9. Other Changes to Extensions
|
|
|
|
10. New Global Constants
|
|
|
|
11. Changes to INI File Handling
|
2014-08-22 11:35:07 +00:00
|
|
|
12. Windows Support
|
|
|
|
13. Other Changes
|
2010-03-24 16:23:50 +00:00
|
|
|
|
2005-11-22 23:49:13 +00:00
|
|
|
|
2010-03-24 16:23:50 +00:00
|
|
|
========================================
|
2012-03-05 20:14:04 +00:00
|
|
|
1. Backward Incompatible Changes
|
2010-03-24 16:23:50 +00:00
|
|
|
========================================
|
2009-06-24 21:16:53 +00:00
|
|
|
|
2014-09-20 23:47:25 +00:00
|
|
|
- Core
|
2014-10-05 20:06:34 +00:00
|
|
|
. list() now always supports ArrayAccess and never supports strings.
|
|
|
|
Previously both were accepted in some situations and not in others.
|
|
|
|
(RFC: https://wiki.php.net/rfc/fix_list_behavior_inconsistency)
|
2014-09-20 23:47:25 +00:00
|
|
|
. Bitwise shifts by negative numbers of bits are disallowed (throws E_WARNING
|
|
|
|
and gives FALSE, like a division by zero).
|
|
|
|
. Left bitwise shifts by a number of bits beyond the bit width of an integer
|
|
|
|
will always result in 0, even on CPUs which wrap around.
|
|
|
|
. Right bitwise shifts by a number of bits beyond the bit width of an integer
|
|
|
|
will always result in 0 or -1 (depending on sign), even on CPUs which wrap
|
|
|
|
around.
|
2014-10-05 20:06:34 +00:00
|
|
|
. Removed ASP (<%) and script (<script language=php>) tags.
|
|
|
|
(RFC: https://wiki.php.net/rfc/remove_alternative_php_tags)
|
2014-12-15 07:49:24 +00:00
|
|
|
. call_user_method() and call_user_method_array() no longer exists.
|
2014-12-15 19:31:53 +00:00
|
|
|
. PHP 7 doesn't keep original values of arguments passed to user functions,
|
|
|
|
so func_get_arg() and func_get_args() will return current value of argument
|
|
|
|
instead of the actually passed. The following code is going to be affected:
|
|
|
|
function foo($x) { $x = 2; return func_get_arg(0);} var_dump(foo(1));
|
|
|
|
It will now produce 2, not 1.
|
|
|
|
. Function parameters with duplicate name are not allowed anymore. Definitions
|
|
|
|
like “function foo($x,$x) {}” will lead to compile time error.
|
2014-12-16 19:00:51 +00:00
|
|
|
. Indirect variable, property and method references are now interpreted with
|
|
|
|
left-to-right semantics. See details in:
|
|
|
|
https://wiki.php.net/rfc/uniform_variable_syntax#semantic_differences_in_existing_syntax
|
|
|
|
. The global keyword now only accepts simple variables. See details in:
|
|
|
|
https://wiki.php.net/rfc/uniform_variable_syntax#global_keyword_takes_only_simple_variables
|
2014-12-19 01:06:46 +00:00
|
|
|
. The addition of Unicode Codepoint Escape Syntax for double-quoted strings
|
|
|
|
and heredocs means that \u{ followed by an invalid sequence will now error.
|
|
|
|
However, \u without a following { is unaffected, so "\u202e" won't error and
|
|
|
|
will work the same as before.
|
2014-12-22 13:44:39 +00:00
|
|
|
. zend_function.common.num_args don't include the variadic argument anymore.
|
2014-12-27 19:56:39 +00:00
|
|
|
. ob_start() no longer issues an E_ERROR, but instead an E_RECOVERABLE_ERROR in case an
|
|
|
|
output buffer is created in an output buffer handler.
|
2014-09-10 13:55:26 +00:00
|
|
|
. Removed support for assigning the result of new by reference.
|
2015-01-17 17:03:42 +00:00
|
|
|
. Removed support for scoped calls to non-static methods from an incompatible
|
2014-09-10 14:08:20 +00:00
|
|
|
$this context. See details in https://wiki.php.net/rfc/incompat_ctx.
|
2015-01-17 17:03:42 +00:00
|
|
|
. Removed support for #-style comments in ini files. Use ;-style comments
|
|
|
|
instead.
|
2015-01-12 09:24:37 +00:00
|
|
|
. Added zend_memnstr_ex, which is based on string matching sunday algo.
|
|
|
|
. Added zend_memnrstr, zend_memnrstr_ex.
|
2015-01-14 09:22:58 +00:00
|
|
|
. Added hybrid sorting algo zend_sort for better performance.
|
|
|
|
. Added stable sorting algo zend_insert_sort.
|
2015-01-09 06:32:36 +00:00
|
|
|
. Invalid octal literals in source code now produce compile errors, fixing
|
|
|
|
PHPSadness #31. Previously, the invalid digits (and any following valid
|
|
|
|
digits) were simply ignored, such that 0781 became 7.
|
2014-09-11 11:03:58 +00:00
|
|
|
. Removed dl() function on fpm-fcgi.
|
2012-04-17 13:45:53 +00:00
|
|
|
. Removed support for hexadecimal numeric strings. This means that some
|
|
|
|
operations like == will no longer specially interpret strings containing
|
|
|
|
hexadecimal numbers. Furthermore is_numeric() will not consider hexadecimal
|
|
|
|
strings to be numeric (use FILTER_VALIDATE_INT instead).
|
|
|
|
(RFC: https://wiki.php.net/rfc/remove_hex_support_in_numeric_strings)
|
2015-02-04 09:22:52 +00:00
|
|
|
. $HTTP_RAW_POST_DATA is no longer available. Use the php://input stream instead.
|
2014-09-20 23:47:25 +00:00
|
|
|
|
2014-09-10 16:18:02 +00:00
|
|
|
- Date:
|
|
|
|
. Removed $is_dst parameter from mktime() and gmmktime().
|
|
|
|
|
2013-12-05 10:30:52 +00:00
|
|
|
- DBA
|
2014-09-24 21:55:13 +00:00
|
|
|
. dba_delete() now returns false if the key was not found for the inifile
|
2013-12-05 10:30:52 +00:00
|
|
|
handler, too.
|
2009-01-28 17:23:28 +00:00
|
|
|
|
2014-09-24 21:55:13 +00:00
|
|
|
- GMP
|
2014-09-28 18:39:19 +00:00
|
|
|
. Requires libgmp version 4.2 or newer now.
|
2014-09-24 21:55:13 +00:00
|
|
|
. gmp_setbit() and gmp_clrbit() now return FALSE for negative indices, making
|
|
|
|
them consistent with other GMP functions.
|
|
|
|
|
2015-01-25 21:14:40 +00:00
|
|
|
- Session
|
|
|
|
. session_start() accepts all INI settings as array. e.g. ['cache_limiter'=>'private']
|
|
|
|
sets session.cache_limiter=private. It also supports 'read_and_close' which closes
|
|
|
|
session data immediately after read data.
|
2015-01-26 01:24:12 +00:00
|
|
|
. Save handler accepts validate_sid(), update_timestamp() which validates session
|
2015-01-25 21:14:40 +00:00
|
|
|
ID existence, updates timestamp of session data. Compatibility of old user defined
|
|
|
|
save handler is retained.
|
|
|
|
. SessionUpdateTimestampHandlerInterface is added. validateSid(), updateTimestamp()
|
|
|
|
is defined in the interface.
|
|
|
|
. session.lazy_write(default=On) INI setting enables only write session data when
|
|
|
|
session data is updated.
|
|
|
|
|
2014-09-10 15:19:02 +00:00
|
|
|
- PCRE:
|
|
|
|
. Removed support for /e (PREG_REPLACE_EVAL) modifier. Use
|
|
|
|
preg_reaplace_callback() instead.
|
|
|
|
|
2014-09-10 15:46:54 +00:00
|
|
|
- Standard:
|
|
|
|
. Removed string category support in setlocale(). Use the LC_* constants
|
|
|
|
instead.
|
2014-09-10 15:30:25 +00:00
|
|
|
. Removed set_magic_quotes_runtime() and its alias magic_quotes_runtime().
|
2014-09-10 15:46:54 +00:00
|
|
|
|
2015-02-08 16:13:22 +00:00
|
|
|
- JSON:
|
2015-01-25 18:56:36 +00:00
|
|
|
. Rejected RFC 7159 incompatible number formats in json_decode string -
|
|
|
|
top level (07, 0xff, .1, -.1) and all levels ([1.], [1.e1])
|
2015-02-08 16:13:22 +00:00
|
|
|
. Empty PHP string passed to json_encode emits a JSON syntax error.
|
2015-01-25 18:56:36 +00:00
|
|
|
|
2014-09-10 15:31:37 +00:00
|
|
|
- Stream:
|
|
|
|
. Removed set_socket_blocking() in favor of its alias stream_set_blocking().
|
|
|
|
|
2012-03-05 20:14:04 +00:00
|
|
|
========================================
|
|
|
|
2. New Features
|
|
|
|
========================================
|
2009-01-28 17:23:28 +00:00
|
|
|
|
2014-08-22 11:35:07 +00:00
|
|
|
- Core
|
2014-12-15 07:49:24 +00:00
|
|
|
. Added null coalesce operator (??).
|
|
|
|
(RFC: https://wiki.php.net/rfc/isset_ternary)
|
2014-12-21 03:08:29 +00:00
|
|
|
. Support for strings with length >= 2^31 bytes in 64 bit builds.
|
|
|
|
. Closure::call() method added.
|
2014-12-19 01:06:46 +00:00
|
|
|
. Added \u{xxxxxx} Unicode Codepoint Escape Syntax for double-quoted strings
|
|
|
|
and heredocs.
|
2014-12-21 03:08:29 +00:00
|
|
|
. define() now supports arrays as constant values, fixing an oversight where define() did not support arrays yet const syntax did.
|
2014-08-22 11:35:07 +00:00
|
|
|
|
2012-03-05 20:14:04 +00:00
|
|
|
========================================
|
2014-05-01 10:27:38 +00:00
|
|
|
3. Changes in SAPI modules
|
2012-03-05 20:14:04 +00:00
|
|
|
========================================
|
2009-01-28 17:23:28 +00:00
|
|
|
|
2014-08-19 23:38:33 +00:00
|
|
|
- FPM
|
|
|
|
. Fixed bug #65933 (Cannot specify config lines longer than 1024 bytes).
|
2014-11-24 08:38:36 +00:00
|
|
|
. Listen = port now listen on all addresses (IPv6 and IPv4-mapped).
|
2009-01-28 17:23:28 +00:00
|
|
|
|
2012-03-05 20:14:04 +00:00
|
|
|
========================================
|
2014-05-01 10:27:38 +00:00
|
|
|
4. Deprecated Functionality
|
2012-03-05 20:14:04 +00:00
|
|
|
========================================
|
2009-01-28 17:23:28 +00:00
|
|
|
|
|
|
|
|
2012-03-05 20:14:04 +00:00
|
|
|
========================================
|
2014-05-01 10:27:38 +00:00
|
|
|
5. Changed Functions
|
2012-03-05 20:14:04 +00:00
|
|
|
========================================
|
2009-06-23 19:40:31 +00:00
|
|
|
|
2014-09-01 14:30:09 +00:00
|
|
|
- parse_ini_file():
|
|
|
|
- parse_ini_string():
|
2014-12-21 03:08:29 +00:00
|
|
|
. Added scanner mode INI_SCANNER_TYPED to yield typed .ini values.
|
2014-11-23 06:23:55 +00:00
|
|
|
- unserialize():
|
2014-12-21 03:08:29 +00:00
|
|
|
. Added second parameter for unserialize function
|
|
|
|
(RFC: https://wiki.php.net/rfc/secure_unserialize) allowing to specify
|
|
|
|
acceptable classes:
|
|
|
|
unserialize($foo, ["allowed_classes" => ["MyClass", "MyClass2"]);
|
2014-09-01 14:30:09 +00:00
|
|
|
|
2013-10-03 13:23:05 +00:00
|
|
|
|
2012-03-05 20:14:04 +00:00
|
|
|
========================================
|
2014-05-01 10:27:38 +00:00
|
|
|
6. New Functions
|
2012-03-05 20:14:04 +00:00
|
|
|
========================================
|
2014-12-01 04:27:05 +00:00
|
|
|
- GMP
|
2015-01-19 05:55:55 +00:00
|
|
|
. Added gmp_random_seed().
|
|
|
|
|
|
|
|
- Standard
|
|
|
|
. Added intdiv() function for integer division.
|
2013-11-04 12:32:45 +00:00
|
|
|
|
2012-03-05 20:14:04 +00:00
|
|
|
========================================
|
2014-05-01 10:27:38 +00:00
|
|
|
7. New Classes and Interfaces
|
2012-03-05 20:14:04 +00:00
|
|
|
========================================
|
2009-01-28 17:23:28 +00:00
|
|
|
|
|
|
|
|
2012-03-05 20:14:04 +00:00
|
|
|
========================================
|
2014-05-01 10:27:38 +00:00
|
|
|
8. Removed Extensions
|
2012-03-05 20:14:04 +00:00
|
|
|
========================================
|
2009-01-28 17:23:28 +00:00
|
|
|
|
|
|
|
|
2012-03-05 20:14:04 +00:00
|
|
|
========================================
|
2014-05-01 10:27:38 +00:00
|
|
|
9. Other Changes to Extensions
|
2012-03-05 20:14:04 +00:00
|
|
|
========================================
|
2012-02-21 10:34:42 +00:00
|
|
|
|
2013-07-25 17:54:03 +00:00
|
|
|
|
2012-03-05 20:14:04 +00:00
|
|
|
========================================
|
2014-05-01 10:27:38 +00:00
|
|
|
10. New Global Constants
|
2012-03-05 20:14:04 +00:00
|
|
|
========================================
|
2010-03-24 16:23:50 +00:00
|
|
|
|
2014-08-01 15:28:20 +00:00
|
|
|
- Core
|
2014-08-06 18:56:32 +00:00
|
|
|
. PHP_INT_MIN added.
|
2010-03-24 16:23:50 +00:00
|
|
|
|
2012-03-05 20:14:04 +00:00
|
|
|
========================================
|
2014-05-01 10:27:38 +00:00
|
|
|
11. Changes to INI File Handling
|
2012-03-05 20:14:04 +00:00
|
|
|
========================================
|
2010-08-30 09:38:47 +00:00
|
|
|
|
2014-10-05 20:06:34 +00:00
|
|
|
- Core
|
|
|
|
. Removed asp_tags ini directive. Trying to enable it will result in a fatal
|
|
|
|
error.
|
2015-02-04 09:22:52 +00:00
|
|
|
. Removed always_populate_raw_post_data ini directive.
|
2014-10-05 20:06:34 +00:00
|
|
|
|
2014-08-22 11:35:07 +00:00
|
|
|
========================================
|
|
|
|
12. Windows Support
|
|
|
|
========================================
|
|
|
|
|
|
|
|
- Core
|
2014-12-21 03:08:29 +00:00
|
|
|
. Support for native 64 bit integers in 64 bit builds.
|
|
|
|
. Support for large files in 64 bit builds.
|
2011-07-27 00:18:35 +00:00
|
|
|
|
2012-03-05 20:14:04 +00:00
|
|
|
========================================
|
2014-08-22 11:35:07 +00:00
|
|
|
13. Other Changes
|
2012-03-05 20:14:04 +00:00
|
|
|
========================================
|
2012-07-14 20:44:21 +00:00
|
|
|
|
2014-09-20 23:47:25 +00:00
|
|
|
- Core
|
2014-11-19 19:59:31 +00:00
|
|
|
. Instead of being undefined and platform-dependent, NaN and Infinity will
|
2014-09-20 23:47:25 +00:00
|
|
|
always be zero when casted to integer.
|
2014-10-05 21:54:32 +00:00
|
|
|
. Calling a method on a non-object no longer raises a fatal error; see
|
2014-12-21 03:08:29 +00:00
|
|
|
also: https://wiki.php.net/rfc/catchable-call-to-member-of-non-object.
|
2014-12-14 18:20:23 +00:00
|
|
|
. Error messages for zend_parse_parameters, type hints and conversions now always say "integer" and "float" instead of "long" and "double".
|