mirror of
https://github.com/php/php-src.git
synced 2024-12-12 03:15:29 +08:00
308 lines
11 KiB
Plaintext
Executable File
308 lines
11 KiB
Plaintext
Executable File
$Id$
|
|
|
|
PHP 5.5 UPGRADE NOTES
|
|
|
|
1. Backward Incompatible Changes
|
|
2. New Features
|
|
2. Changes in SAPI modules
|
|
3. Deprecated Functionality
|
|
4. Changed Functions
|
|
5. New Functions
|
|
6. New Classes and Interfaces
|
|
7. Removed Extensions
|
|
8. Other Changes to Extensions
|
|
9. New Global Constants
|
|
10. Changes to INI File Handling
|
|
11. Windows Support
|
|
12. Other Changes
|
|
|
|
|
|
========================================
|
|
1. Backward Incompatible Changes
|
|
========================================
|
|
|
|
- Drop Windows XP and 2003 support. (Pierre)
|
|
- All internal case insensitivity handling for class, function and constant
|
|
names is done according to ASCII rules, current locale settings are ignored.
|
|
- php_logo_guid(), php_egg_logo_guid(), php_real_logo_guid() and
|
|
zend_logo_guid() have been removed
|
|
- Removal of Logo GUIDs
|
|
|
|
- extensions can't override zend_execute() any more, they should override
|
|
zend_execute_ex() instead. The EG(current_execute_data) is already
|
|
initialized in zend_execute_ex(), so for compatibility extensions
|
|
may need to use EG(current_execute_data)->prev_execute_data instead.
|
|
- removed EG(arg_types_stack), EX(fbc), EX(called_scope), EX(current_object)
|
|
- added op_array->nested_calls. It's calculated at compile time.
|
|
- added EX(call_slots). It is an array to store information about syntaticaly
|
|
nested calls (e.g. foo(bar())). It's preallocated together with execute_data.
|
|
- added EX(call) - pointer to a current calling function. Actually an
|
|
element of EX(call_slots)
|
|
- opcodes INIT_METHOD_CALL, ZEND_INIT_STATIC_METHOD_CALL,
|
|
ZEND_INIT_FCALL_BY_NAME, ZEND_INIT_NS_FCALL_BY_NAME use result.num as
|
|
an index in EX(call_slots)
|
|
- opcode ZEND_NEW uses extended_vallue as an index in EX(call_slots)
|
|
- opcoes ZEND_DO_FCALL and ZEND_DO_FCALL_BY_NAME use op2.num as
|
|
an index in EX(call_slots)
|
|
- added op_array->used_stack. It's calculated at compile time and the
|
|
corresponding stack space is preallocated together with execute_data.
|
|
ZEND_SEND* and ZEND_DO_FCALL* don't need to check for stack overflow
|
|
anymore.
|
|
- Removed execute_data->Ts field. The VM temporary variables always allocated
|
|
immediately before execute_data structure. Now they are accessed by offset
|
|
from the execute_data base pointer (instead of execute_data->Ts). Compiler
|
|
stores new offsets in op_array->opcodes[*].op?.num. You can use macros
|
|
EX_TMP_VAR() and EX_TMP_VAR_NUM() to access temp_variable by offset or
|
|
number. You can convert number to offset using EX_TMP_VAR_NUM(0, num) or
|
|
offset to number (EX_TMP_VAR_NUM(0,0)-EX_TMP_VAR(0,offset)).
|
|
- Removed execute_data->CVs field. The VM compiled variables always allocated
|
|
immediately after execute_data structure. Now they are accessed by offset
|
|
from the execute_data base pointer (instead of execute_data->CVs). You can
|
|
use macros EX_CV_NUM() to access compiled variables by number.
|
|
|
|
========================================
|
|
2. New Features
|
|
========================================
|
|
|
|
- Support list in foreach. (Laruence)
|
|
(wiki.php.net/rfc/foreachlist)
|
|
- Support finally keyword. (Laruence)
|
|
(wiki.php.net/rfc/finally)
|
|
- Support constant array/string dereferencing. (Laruence)
|
|
(https://wiki.php.net/rfc/constdereference)
|
|
- Add support for using empty() on the result of function calls and
|
|
other expressions. Thus it is now possible to write empty(getArray()),
|
|
for example. (https://wiki.php.net/rfc/empty_isset_exprs)
|
|
- Added generators.
|
|
(https://wiki.php.net/rfc/generators)
|
|
|
|
========================================
|
|
2. Changes in SAPI modules
|
|
========================================
|
|
|
|
|
|
========================================
|
|
3. Deprecated Functionality
|
|
========================================
|
|
|
|
- The original MySQL extension is now deprecated, and will generate deprecation
|
|
warnings when connecting to a database through mysql_connect(),
|
|
mysql_pconnect() or by establishing an implicit connection. Use MySQLi or PDO
|
|
instead.
|
|
- The preg_replace /e modifier is now deprecated. Use
|
|
preg_replace_callback instead.
|
|
(https://wiki.php.net/rfc/remove_preg_replace_eval_modifier)
|
|
- IntlDateFormatter::setTimeZoneID() and datefmt_set_timezone_id() are
|
|
deprecated. Use IntlDateFormatter::setTimeZone() or datefmt_set_timezone()
|
|
instead.
|
|
- mcrypt_ecb(), mcrypt_cbc(), mcrypt_cfb() and mcrypt_ofb() now throw
|
|
E_DEPRECATED. Their use was already previously discouraged in the docs,
|
|
but that predated the existence of E_DEPRECATED.
|
|
|
|
========================================
|
|
4. Changed Functions
|
|
========================================
|
|
|
|
- pack()/unpack() had the following changes, which bring it more in line
|
|
with Perl's behavior:
|
|
- Implemented format character "Z": NULL padded string, with trailing NULL
|
|
bytes removed.
|
|
- Changed format character "a": this no longer removes trailing NULL bytes.
|
|
- Changed format character "A": all trailing ASCII whitespace is now removed
|
|
(defined as spaces, tabs, \r, \n and NULL).
|
|
- MessageFormatter::format() and related functions now accepted named arguments
|
|
and mixed numeric/named arguments in ICU 4.8+.
|
|
- MessageFormatter::format() and related functions now don't error out when
|
|
an insufficient argument count is provided. Instead, the placeholders will
|
|
remain unsubstituted.
|
|
- MessageFormatter::parse() and MessageFormat::format() (and their static
|
|
equivalents) now don't throw away better than second precision in the
|
|
arguments.
|
|
- IntlDateFormatter::__construct and datefmt_create() now accept for the
|
|
$timezone argument time zone identifiers, IntlTimeZone objects, DateTimeZone
|
|
objects and NULL. It used to accept only time zone identifiers and NULL.
|
|
Invalid time zone identifiers are no longer accepted. Emptry strings are
|
|
no longer accepted.
|
|
- The default time zone used in IntlDateFormatter::__construct and
|
|
datefmt_create() (when the corresponding argument is not passed or NULL is
|
|
passed) is now the one given by date_default_timezone_get(), not the
|
|
default ICU time zone.
|
|
- The time zone passed to the IntlDateFormatter is ignored if it is NULL and if
|
|
the calendar passed is an IntlCalendar object -- in this case, the
|
|
IntlCalendar's time zone will be used instead. Otherwise, the time zone
|
|
specified in the $timezone argument is used instead. This does not affect
|
|
old code, as IntlCalendar was introduced in this version.
|
|
- IntlDateFormatter::__construct and datefmt_create() now accept for the
|
|
$calendar argument also IntlCalendar objects.
|
|
- IntlDateFormatter::getCalendar() and datefmt_get_calendar() return false
|
|
if the IntlDateFormatter was set up with an IntlCalendar instead of the
|
|
constants IntlDateFormatter::GREGORIAN/TRADITIONAL. IntlCalendar did not
|
|
exist before this version.
|
|
- IntlDateFormatter::setCalendar() and datefmt_set_calendar() now also accept
|
|
an IntlCalendar object, in which case its time zone is taken. Passing a
|
|
constant is still allowed, and still keeps the time zone.
|
|
- IntlDateFormatter::format() and datefmt_format() now also accept an
|
|
IntlCalendar object for formatting.
|
|
- php_logo_guid(), php_egg_logo_guid(), php_real_logo_guid() and
|
|
zend_logo_guid() have been removed
|
|
- set_error_handler(NULL) can now be used to reset the error handler.
|
|
Furthermore both set_error_handler(NULL) and set_exception_handler(NULL) will
|
|
now return the previously defined error/exception handler. Previously
|
|
bool(true) was returned.
|
|
|
|
========================================
|
|
5. New Functions
|
|
========================================
|
|
|
|
- Core:
|
|
- boolval()
|
|
- password_get_info()
|
|
- password_hash()
|
|
- password_needs_rehash()
|
|
- password_verify()
|
|
|
|
- Hash:
|
|
- hash_pbkdf2()
|
|
|
|
- Intl:
|
|
- datefmt_format_object()
|
|
- datefmt_get_calendar_object()
|
|
- datefmt_get_timezone()
|
|
- datefmt_set_timezone()
|
|
- datefmt_get_calendar_object()
|
|
- intlcal_create_instance()
|
|
- intlcal_get_keyword_values_for_locale()
|
|
- intlcal_get_now()
|
|
- intlcal_get_available_locales()
|
|
- intlcal_get()
|
|
- intlcal_get_time()
|
|
- intlcal_set_time()
|
|
- intlcal_add()
|
|
- intlcal_set_time_zone()
|
|
- intlcal_after()
|
|
- intlcal_before()
|
|
- intlcal_set()
|
|
- intlcal_roll()
|
|
- intlcal_clear()
|
|
- intlcal_field_difference()
|
|
- intlcal_get_actual_maximum()
|
|
- intlcal_get_actual_minimum()
|
|
- intlcal_get_day_of_week_type()
|
|
- intlcal_get_first_day_of_week()
|
|
- intlcal_get_greatest_minimum()
|
|
- intlcal_get_least_maximum()
|
|
- intlcal_get_locale()
|
|
- intlcal_get_maximum()
|
|
- intlcal_get_minimal_days_in_first_week()
|
|
- intlcal_get_minimum()
|
|
- intlcal_get_time_zone()
|
|
- intlcal_get_type()
|
|
- intlcal_get_weekend_transition()
|
|
- intlcal_in_daylight_time()
|
|
- intlcal_is_equivalent_to()
|
|
- intlcal_is_lenient()
|
|
- intlcal_is_set()
|
|
- intlcal_is_weekend()
|
|
- intlcal_set_first_day_of_week()
|
|
- intlcal_set_lenient()
|
|
- intlcal_equals()
|
|
- intlcal_get_repeated_wall_time_option()
|
|
- intlcal_get_skipped_wall_time_option()
|
|
- intlcal_set_repeated_wall_time_option()
|
|
- intlcal_set_skipped_wall_time_option()
|
|
- intlcal_from_date_time()
|
|
- intlcal_to_date_time()
|
|
- intlcal_get_error_code()
|
|
- intlcal_get_error_message()
|
|
- intlgregcal_create_instance()
|
|
- intlgregcal_set_gregorian_change()
|
|
- intlgregcal_get_gregorian_change()
|
|
- intlgregcal_is_leap_year()
|
|
- intltz_create_time_zone()
|
|
- intltz_create_default()
|
|
- intltz_get_id()
|
|
- intltz_get_gmt()
|
|
- intltz_get_unknown()
|
|
- intltz_create_enumeration()
|
|
- intltz_count_equivalent_ids()
|
|
- intltz_create_time_zone_id_enumeration()
|
|
- intltz_get_canonical_id()
|
|
- intltz_get_region()
|
|
- intltz_get_tz_data_version()
|
|
- intltz_get_equivalent_id()
|
|
- intltz_use_daylight_time()
|
|
- intltz_get_offset()
|
|
- intltz_get_raw_offset()
|
|
- intltz_has_same_rules()
|
|
- intltz_get_display_name()
|
|
- intltz_get_dst_savings()
|
|
- intltz_from_date_time_zone()
|
|
- intltz_to_date_time_zone()
|
|
- intltz_get_error_code()
|
|
- intltz_get_error_message()
|
|
|
|
- IntlDateFormatter::formatObject()
|
|
- IntlDateFormatter::getCalendarObject()
|
|
- IntlDateFormatter::getTimeZone()
|
|
- IntlDateFormatter::setTimeZone()
|
|
|
|
- SPL:
|
|
- SplFixedArray::__wakeup()
|
|
|
|
========================================
|
|
6. New Classes and Interfaces
|
|
========================================
|
|
|
|
- Intl:
|
|
- IntlCalendar
|
|
- IntlGregorianCalendar
|
|
- IntlTimeZone
|
|
- IntlBreakIterator
|
|
- IntlRuleBasedBreakIterator
|
|
- IntlCodePointBreakIterator
|
|
|
|
========================================
|
|
7. Removed Extensions
|
|
========================================
|
|
|
|
|
|
========================================
|
|
8. Other Changes to Extensions
|
|
========================================
|
|
|
|
- Intl:
|
|
- This extension now requires ICU 4.0+.
|
|
|
|
========================================
|
|
9. New Global Constants
|
|
========================================
|
|
|
|
- mysqli:
|
|
- Added MYSQLI_SERVER_PUBLIC_KEY constant to be used with mysqli_options()
|
|
|
|
========================================
|
|
10. Changes to INI File Handling
|
|
========================================
|
|
|
|
- Intl:
|
|
- Added intl.use_exceptions INI directive, which controls what happens when
|
|
global errors are set together with intl.error_level.
|
|
|
|
- mysqlnd:
|
|
- Added mysqlnd.sha256_server_public_key INI PERDIR setting that affects all
|
|
APIs which use(are built) for mysqlnd. This allows ext/mysqli to be used
|
|
with the new auth protocol, although at coarser level.
|
|
|
|
========================================
|
|
11. Windows Support
|
|
========================================
|
|
|
|
- Apache 2.4 handler is supported as of PHP 5.5.0
|
|
|
|
|
|
========================================
|
|
12. Other Changes
|
|
========================================
|
|
|
|
- Logo GUIDs will no longer work
|