summaryrefslogtreecommitdiff
path: root/UPGRADING
diff options
context:
space:
mode:
Diffstat (limited to 'UPGRADING')
-rwxr-xr-xUPGRADING1199
1 files changed, 430 insertions, 769 deletions
diff --git a/UPGRADING b/UPGRADING
index e6f582a4a8..eb3bf999a4 100755
--- a/UPGRADING
+++ b/UPGRADING
@@ -1,820 +1,481 @@
$Id$
-PHP 5.4 UPGRADE NOTES
-
-===========
-0. Contents
-===========
-
-1. Changes to INI directives
-2. Changes to reserved words and classes
-3. Changes to engine behavior
-4. Changes to existing functions
-5. Changes to existing classes
-6. Changes to existing methods
-7. Deprecated Functionality
-8. Removed Functionality
- a. Removed features
- b. Removed functions
- c. Removed syntax
- d. Removed hash algorithms
-9. Extension Changes:
- a. Extensions no longer maintained
- b. Extensions with changed behavior
-10. Changes in SAPI support
-11. Windows support
-12. New in PHP 5.4:
- a. New features
- b. Syntax additions
- c. New functions
- d. New global constants
- e. New classes
- f. New methods
- g. New hash algorithms
-
-=============================
-1. Changes to INI directives
-=============================
-
-- PHP 5.4 now checks at compile time if /dev/urandom or /dev/arandom
- are present. If either is available, session.entropy_file now
- defaults to that file and session.entropy_length defaults to 32.
- This provides non-blocking entropy to session id generation. If you
- do not want extra entropy for your session ids, add:
-
- session.entropy_file=
- session.entropy_length=0
-
- to your php.ini to preserve pre-PHP 5.4 behavior.
-
-- Deprecated php.ini directives will now throw an E_CORE_WARNING's
- instead of the previous E_WARNING's.
-
-- The following php.ini directives are no longer available in PHP 5.4
- and will now throw an E_CORE_ERROR upon startup:
- - allow_call_time_pass_reference
- - define_syslog_variables
- - highlight.bg
- - magic_quotes_gpc
- - magic_quotes_runtime
- - magic_quotes_sybase
- - register_globals
- - register_long_arrays
- - safe_mode
- - safe_mode_gid
- - safe_mode_include_dir
- - safe_mode_exec_dir
- - safe_mode_allowed_env_vars
- - safe_mode_protected_env_vars
- - session.bug_compat_42
- - session.bug_compat_warn
- - y2k_compliance
- - zend.ze1_compatibility_mode
-
-- the following new php.ini directives were added:
- - max_input_vars - specifies how many GET/POST/COOKIE input
- variables may be accepted. The default value is 1000.
-
-- E_ALL now includes E_STRICT.
-
-- The recommended production value for error_reporting changed to E_ALL &
- ~E_DEPRECATED & ~E_STRICT.
-
-- Added new session support directives:
- session.upload_progress.enabled
- session.upload_progress.cleanup
- session.upload_progress.prefix
- session.upload_progress.name
- session.upload_progress.freq
- session.upload_progress.min_freq
-
-- Added a zend.multibyte directive as a replacement of the PHP compile time
- configuration option --enable-zend-multibyte. Now the Zend Engine always
- contains code for multibyte support, which can be enabled or disabled at
- runtime. Note: It doesn't make a lot of sense to enable this option if
- ext/mbstring is not enabled, because most functionality is implemented by
- mbstrings callbacks.
-
-- Added zend.script_encoding. This value will be used unless a
- "declare(encoding=...)" directive appears at the top of the script.
-
-- Added zend.signal_check to check for replaced signal handlers on shutdown
-
-- Added enable_post_data_reading, which is enabled by default. When it's
- disabled, the POST data is not read (or processed); the behavior is similar
- to that of other request methods with body, like PUT. This allows reading
- the raw POST data in multipart requests and reading/processing the POST data
- in a stream fashion (through php://input) without having it copied in memory
- multiple times.
-
-- Added windows_show_crt_warning. This directive shows the CRT warnings when
- enabled. These warnings were displayed by default until now. It is disabled
- by default.
-
-- Added cli.pager to set a pager for CLI interactive shell output.
-
-- Added cli.prompt to configure the CLI interactive shell prompt.
-
-- Added cli_server.color to enable the CLI web server to use ANSI color coding
- in terminal output.
+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
+
========================================
-2. Changes to reserved words and classes
+1. Backward Incompatible Changes
========================================
-- "callable", "insteadof" and "trait" are now reserved words.
-
-=============================
-3. Changes to engine behavior
-=============================
-
-- The __construct arguments of an extended abstract constructor must
- now match:
-
- abstract class Base
- {
- abstract public function __construct();
- }
- class Foo extends Base
- {
- public function __construct($bar) {}
- }
-
- This now emits a Fatal error due the incompatible declaration.
-
-- In previous versions, superglobal names could be used for parameter
- names, thereby shadowing the corresponding superglobal. In PHP 5.4
- this now causes a fatal error such as "Cannot re-assign auto-global
- variable GLOBALS".
-
-- Turning null, false or an empty string into an object by adding a
- property will now emit a warning instead of an E_STRICT error.
-
- $test = null;
- $test->baz = 1;
-
- To create a generic object you can use StdClass:
-
- $test = new StdClass;
- $test->baz = 1;
-
-- Converting an array to a string now will cause an E_NOTICE warning.
-
-- Non-numeric string offsets, e.g. $a['foo'] where $a is a string, now
- return false on isset() and true on empty(), and produce warning if
- trying to use them. Offsets of types double, bool and null produce
- notice. Numeric strings ($a['2']) still work as before.
-
- Note that offsets like '12.3' and '5 and a half' are considered
- non-numeric and produce warning, but are converted to 12 and 5
- respectively for backwards compatibility reasons.
-
-- Long numeric strings that do not fit in integer or double (such as
- "92233720368547758070") are compared using string comparison if
- they could otherwise result in precision loss - since 5.4.4.
-
-- Closures now support scopes and $this and can be rebound to
- objects using Closure::bind() and Closure::bindTo().
-
-- <?= is now always available regardless of the short_open_tag
- setting.
-
-- Parse error messages are changed to contain more information about
- the error.
-
-- __clone and __destruct since 5.4.4 follow the same scoping rules as
- the rest of the methods (see bug #61782 for details).
-
-================================
-4. Changes to existing functions
-================================
-
-- array_combine now returns array() instead of FALSE when two empty arrays are
- provided as parameters.
-
-- dns_get_record() has an extra parameter which allows requesting DNS records
- by numeric type and makes the result include only the raw data of the
- response.
-
-- call_user_func_array() no longer allows call-time pass by reference.
-
-- the default character set for htmlspecialchars() and htmlentities() is
- now UTF-8. In previous versions it was ISO-8859-1. Note that changing
- your output charset via the php.ini default_charset directive does not
- affect htmlspecialchars/htmlentities unless you are passing "" (an
- empty string) as the encoding parameter to your htmlspecialchars/htmlentities
- calls.
-
-- htmlentities() and htmlspecialchars() are stricter in the code units they
- accept for the asian encodings. For Big5-HKSCS, the octets 0x80 and 0xFF are
- rejected. For GB2312/EUC-CN, the octets 0x8E, 0x8F, 0xA0 and 0xFF are
- rejected. For SJIS, the octets 0x80, 0xA0, 0xFD, 0xFE and 0xFF are rejected,
- except maybe after a valid starting byte. For EUC-JP, the octets 0xA0 and
- 0xFF are rejected.
-
-- htmlentities() now emits an E_STRICT warning when used with asian characters,
- as in that case htmlentities has (and already had before this version) the
- same functionality as htmlspecialchars.
-
-- htmlentities() no longer numerically encodes high characters for single-byte
- encodings (except when there's actually a corresponding named entity). This
- behavior was not documented and was inconsistent with that for "UTF-8".
-
-- html_entity_decode() and htmlspecialchars_decode() behave more consistently,
- now decoding entities in malformed strings such as "&&amp;" or "&#&amp;".
-
-- htmlentities(), htmlspecialchars(), html_entity_decode(), and
- htmlspecialchars_decode: Added the flags ENT_HTML401, ENT_XML1, ENT_XHTML,
- and ENT_HTML5. The behavior of these functions including, but not limited to,
- the characters that are encoded and the entities that are decoded depend on
- the document type that is specified by those flags.
-
-- htmlentities() and htmlspecialchars() with !$double_encode do more strict
- checks on the validity of the entities. Numerical entities are checked for a
- valid range (0 to 0x10FFFF); if the flag ENT_DISALLOWED is given, the
- validity of such numerical entity in the target document type is also
- checked. Named entities are checked for necessary existence in the target
- document type instead of only checking whether they were constituted by
- alphanumeric characters.
-
-- The flag ENT_DISALLOWED was added. In addition to the behavior described in
- the item before, it also makes htmlentities() and htmlspecialchars()
- substitute characters that appear literally in the argument string and which
- are not allowed in the target document type with U+FFFD (UTF-8) or &#xFFFD;.
-
-- The flag ENT_SUBSTITUTE was added. This flag makes invalid multibyte
- sequences be replaced by U+FFFD (UTF-8) or &#FFFD; by htmlspecialchars() and
- htmlentities(). It is an alternative to the default behavior, which just
- returns an empty string and to ENT_IGNORE, which is a security risk. The
- behavior follows the recommendations of Unicode Technical Report #36.
-
-- htmlspecialchars_decode() and html_entity_decode() now decode &apos; if the
- document type is ENT_XML1, ENT_XHTML, or ENT_HTML5.
-
-- Charset detection with $charset == '' no longer turns to mbstring's
- internal encoding defined through mb_internal_encoding(). Only the encoding
- defined through the php.ini setting mbstring.internal_encoding is considered.
-
-- number_format() no longer truncates multibyte decimal points and thousand
- separators to the first byte.
-
-- The third parameter ($matches) to preg_match_all() is now optional. If
- omitted, the function will simply return the number of times the pattern was
- matched in the subject and will have no other side effects.
-
-- The second argument of scandir() now accepts SCANDIR_SORT_NONE (2) as a
- possible value. This value results in scandir() performing no sorting: on
- local filesystems, this allows files to be returned in native filesystem
- order.
-
-- stream_select() now preserves the keys of the passed array, be they numeric or
- strings. This breaks code that iterated the resulting stream array using a
- numeric index, but makes easier to identify which of the passed streams are
- present in the result.
-
-- stream_set_write_buffer() no longer disables the read buffer of a plain
- stream when 0 is given as the second argument.
+- Dropped Windows XP and 2003 support. (Pierre)
-- stream_set_write_buffer() no longer changes the chunk size in socket streams.
+- All internal case insensitivity handling for class, function and constant
+ names is done according to ASCII rules. Current locale settings are ignored.
-- fclose() closes streams with resource refcount > 1; it doesn't merely
- decrement the resource refcount.
+- self, parent & static keywords now are always case-insensitive (see bug
+ #60833).
-- socket_set_options() and socket_get_options() now support multicast options.
+- Removed Logo GUIDs: php_logo_guid(), php_egg_logo_guid(),
+ php_real_logo_guid() and zend_logo_guid()
-- The raw data parameter in openssl_encrypt() and openssl_decrypt() is now an
- options integer rather than a boolean. A value of true produces the same
- behavior.
-
-- Write operations within XSLT (for example with the extension sax:output) are
- disabled by default. You can define what is forbidden with the method
- XsltProcess::setSecurityPrefs($options).
-
-- Added AES support to OpenSSL.
-
-- openssl_csr_new() expects the textual data to be in UTF-8.
-
-- Added no-padding option to openssl_encrypt() and openssl_decrypt().
-
-- Added a "no_ticket" SSL context option to disable the SessionTicket TLS
- extension.
-
-- Added new json_encode() options: JSON_PRETTY_PRINT, JSON_UNESCAPED_SLASHES,
- JSON_NUMERIC_CHECK, JSON_BIGINT_AS_STRING, JSON_UNESCAPED_UNICODE.
-
-- Added Tokyo Cabinet and Berkley DB 5 support to DBA extension.
-
-- Added support for CURLOPT_MAX_SEND_SPEED_LARGE and CURLOPT_MAX_RECV_SPEED_LARGE
- to cURL.
-
-- Added optional argument to debug_backtrace() and debug_print_backtrace()
- to limit the amount of stack frames returned.
-
-- Fixed crypt_blowfish handling of 8-bit characters. crypt() in Blowfish mode
- now supports hashes marked $2a$, $2x$, $2y$ and $2z$.
-
-- mbstring now supports following encodings: Shift_JIS/UTF-8 Emoji,
- JIS X0213:2004 (Shift_JIS-2004, EUC-JP-2004, ISO-2022-JP-2004),
- MacJapanese (Shift_JIS), gb18030.
-
-- Added encode and decode in hex format to mb_encode_numericentity() and
- mb_decode_numericentity().
-
-- Added support for SORT_NATURAL and SORT_FLAG_CASE in array sort functions:
- sort(), rsort(), ksort(), krsort(), asort(), arsort() and array_multisort().
+========================================
+2. New Features
+========================================
-- is_a() and is_subclass_of() now have third boolean parameter, which specifies
- if the first argument can be a string class name. Default if false for is_a
- and true for is_subclass_of() for BC reasons.
+- Support list in foreach. (Laruence)
+ (http://php.net/foreach#control-structures.foreach.list,
+ http://wiki.php.net/rfc/foreachlist)
-- ob_start() will now treat a chunk size of 1 as meaning 1 byte, rather than
- the previous special case behavior of treating it as 4096 bytes.
+- Support "finally" keyword. (Laruence)
+ (http://php.net/exceptions, http://wiki.php.net/rfc/finally)
-- idn_to_ascii() and idn_to_utf8() now take two extra parameters, one indicating
- the variant (IDNA 2003 or UTS #46) and another, passed by reference, to return
- details about the operation in case UTS #46 is chosen.
+- Support constant array/string dereferencing. (Laruence)
+ (http://php.net/manual/en/language.types.array.php,
+ https://wiki.php.net/rfc/constdereference)
-- gzencode() used with FORCE_DEFLATE now generates RFC1950 compliant data.
+- 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. (http://php.net/manual/en/function.empty.php,
+ https://wiki.php.net/rfc/empty_isset_exprs)
-- ob_start() no longer starts multiple output buffers when passed
- array("callback1", "callback2", "callback3", ...).
+- Added generators.
+ (http://php.net/generators, https://wiki.php.net/rfc/generators)
-- Since 5.4.4, "php://fd" stream syntax is available only in CLI build.
+- ClassName::class syntax returning full class name for a class as a
+ string constant. (http://php.net/oop5.basic,
+ https://wiki.php.net/rfc/class_name_scalars)
-- Since 5.4.5, resourcebundle_create() accepts null for the first two arguments.
+- Added support for non-scalar Iterator keys in foreach.
+ (http://php.net/manual/en/control-structures.foreach.php,
+ https://wiki.php.net/rfc/foreach-non-scalar-keys).
-- Since 5.4.6, SimpleXMLElement::getDocNamespaces() has and extra parameter which
- allows for toggling if the list of namespaces starts from the document root
- or from the node you call the method on
+- Bundled Zend OPcache extension to improve performance
+ (http://php.net/manual/en/book.opcache.php,
+ https://wiki.php.net/rfc/optimizerplus)
-- Since 5.4.7, ctor is always called when new user stream wrapper object is created.
- Before, it was called only when stream_open was called.
+- Added a simplified password hashing API
+ (http://php.net/password, https://wiki.php.net/rfc/password_hash)
-==============================
-5. Changes to existing classes
-==============================
+========================================
+2. Changes in SAPI modules
+========================================
-- Classes that implement stream wrappers can define a method called
- stream_truncate that will respond to truncation, e.g. through ftruncate.
- Strictly speaking, this is an addition to the user-space stream wrapper
- template, not a change to an actual class.
+- Support for changing the process's title in CLI/CLI-Server
+ SAPIs. (Keyur)
+ (http://php.net/manual/en/function.cli-set-process-title.php,
+ http://php.net/manual/en/function.cli-get-process-title.php,
+ https://wiki.php.net/rfc/cli_process_title)
-- Classes that implement stream wrappers can define a method called
- stream_metadata that will be called on touch(), chmod(), chgrp(), chown().
+- Support for systemd in php-fpm: Add --with-fpm-systemd option to
+ report health to systemd, and add systemd_interval option to
+ configure this. The service can now use Type=notify in the systemd
+ unit file. (Remi)
-- Arrays cast from SimpleXMLElement now always contain all nodes instead of
- just the first matching node.
+========================================
+3. Deprecated Functionality
+========================================
-- All SimpleXMLElement children are now always printed when using var_dump(),
- var_export(), and print_r().
+- 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.
-- Added iterator support in MySQLi. mysqli_result implements Traversable.
+- The preg_replace /e modifier is now deprecated. Use
+ preg_replace_callback instead.
+ (https://wiki.php.net/rfc/remove_preg_replace_eval_modifier)
-==============================
-6. Changes to existing methods
-==============================
+- IntlDateFormatter::setTimeZoneID() and datefmt_set_timezone_id() are
+ deprecated. Use IntlDateFormatter::setTimeZone() or
+ datefmt_set_timezone() instead.
-- DateTime::parseFromFormat() now has a "+" modifier to allow trailing text in
- the string to parse without throwing an error.
+- mcrypt_ecb(), mcrypt_cbc(), mcrypt_cfb() and mcrypt_ofb() now throw
+ E_DEPRECATED. Their use was already previously discouraged in the
+ documentation, but that predated the existence of E_DEPRECATED.
-- Added the ability to pass options to DOMDocument::loadHTML().
+========================================
+4. Changed Functions
+========================================
-- FilesystemIterator, GlobIterator and (Recursive)DirectoryIterator now use
- the default stream context.
+- 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. Empty 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.
+
+- 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.
+
+- setcookie(), setrawcookie() and ext/session now send Max-Age headers
+ alongside Expires headers. (see
+ https://wiki.php.net/rfc/cookie_max-age)
+
+- curl_setopt now accepts new option CURLOPT_SAFE_UPLOAD and CURLFile
+ object for safer file uploads (see
+ https://wiki.php.net/rfc/curl-file-upload)
+
+- Functions in the socket extension now do not emit warnings when the
+ errno is EAGAIN, EWOULDBLOCK or EINPROGRESS.
+
+- Since 5.5.2, spl_autoload_functions() returns different names for
+ different lambda functions registered via spl_autoload_register().
+
+- Since 5.5.3, DOMDocument::schemaValidateSource() and
+ DOMDocument::schemaValidate() accept flag parameter. Only flag
+ available now is LIBXML_SCHEMA_CREATE. Default is 0.
-- Since 5.4.5, the constructor of ResourceBundle accepts NULL for the first two
- arguments.
+========================================
+5. New Functions
+========================================
-===========================
-7. Deprecated Functionality
-===========================
+- Core:
+ - array_column()
+ - boolval()
+ - password_get_info()
+ - password_hash()
+ - password_needs_rehash()
+ - password_verify()
+
+- cURL:
+ - curl_file_create
+
+- GD
+ - imageflip
+ - imagecrop
+ - imagecropauto
+ - imagesetinterpolation
+ - imageaffine
+ - imageaffinematrixget
+ - imageaffinematrixconcat
+ - imagescale
+
+- 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()
+
+- Sockets:
+ - socket_sendmsg()
+ - socket_recvmsg()
+ - socket_cmsg_space()
+
+- SPL:
+ - SplFixedArray::__wakeup()
+ - SplDoublyLinkedList::add()
+ - RecursiveTreeIterator::getPostfix() (5.5.2)
+ - RecursiveTreeIterator::setPostfix() (5.5.2)
+
+- Zend OPcache:
+ - opcache_get_configuration()
+ - opcache_get_status()
+ - opcache_reset()
-- The following functions are deprecated in PHP 5.4:
- - mcrypt_generic_end(): use mcrypt_generic_deinit() instead
- - mysql_list_dbs()
+========================================
+6. New Classes and Interfaces
+========================================
-========================
-8. Removed Functionality
-========================
+- Intl:
+ - IntlCalendar
+ - IntlGregorianCalendar
+ - IntlTimeZone
+ - IntlBreakIterator
+ - IntlRuleBasedBreakIterator
+ - IntlCodePointBreakIterator
+ - UConverter
-a. Removed features
+- cURL:
+ - CURLFile
- The following features have been removed from PHP 5.4:
+========================================
+7. Removed Extensions
+========================================
- - Magic quotes
- - Register globals
- - Safe mode
- - Session extension bug compatibility mode
- - Y2K compliance mode
+None
-b. Removed functions
+========================================
+8. Other Changes to Extensions
+========================================
- The following functions are no longer available in PHP 5.4:
+- Intl:
+ - This extension now requires ICU 4.0+.
- - define_syslog_variables()
- - import_request_variables()
- - session_is_registered()
- - session_register()
- - session_unregister()
- - set_magic_quotes_runtime()
- - mysqli_bind_param() (alias of mysqli_stmt_bind_param())
- - mysqli_bind_result() (alias of mysqli_stmt_bind_result())
- - mysqli_client_encoding() (alias of mysqli_character_set_name())
- - mysqli_fetch() (alias of mysqli_stmt_fetch())
- - mysqli_param_count() (alias of mysqli_stmt_param_count())
- - mysqli_get_metadata() (alias of mysqli_stmt_result_metadata())
- - mysqli_send_long_data() (alias of mysqli_stmt_send_long_data())
- - mysqli::client_encoding() (alias of mysqli::character_set_name)
- - mysqli_stmt::stmt() (never worked/always throws, undocumented)
+========================================
+9. New Global Constants
+========================================
-c. Removed syntax
+- mysqli:
+ - Added MYSQLI_SERVER_PUBLIC_KEY constant to be used with mysqli_options()
+
+- cURL:
+ - Added CURLOPT_SAFE_UPLOAD to be used with curl_setopt().
+ - Added CURL_WRAPPERS_ENABLED to reflect --with-curlwrappers.
+
+- GD
+ - Added constants for imageflip:
+ . IMG_FLIP_HORIZONTAL
+ . IMG_FLIP_VERTICAL
+ . IMG_FLIP_BOTH
+ - Added constants for imagecrop
+ . IMG_CROP_DEFAULT
+ . IMG_CROP_TRANSPARENT
+ . IMG_CROP_BLACK
+ . IMG_CROP_WHITE
+ . IMG_CROP_SIDES
+ . IMG_CROP_THRESHOLD
+ - Added constants for imagesetinterpolation, used by imagescale
+ imagerotate and imageaffine:
+ . IMG_BELL
+ . IMG_BESSEL
+ . IMG_BILINEAR_FIXED
+ . IMG_BICUBIC
+ . IMG_BICUBIC_FIXED
+ . IMG_BLACKMAN
+ . IMG_BOX
+ . IMG_BSPLINE
+ . IMG_CATMULLROM
+ . IMG_GAUSSIAN
+ . IMG_GENERALIZED_CUBIC
+ . IMG_HERMITE
+ . IMG_HAMMING
+ . IMG_HANNING
+ . IMG_MITCHELL
+ . IMG_POWER
+ . IMG_QUADRATIC
+ . IMG_SINC
+ . IMG_NEAREST_NEIGHBOUR
+ . IMG_WEIGHTED4
+ . IMG_TRIANGLE
+ - Added constants for imageaffinematrixget
+ . IMG_AFFINE_TRANSLATE
+ . IMG_AFFINE_SCALE
+ . IMG_AFFINE_ROTATE
+ . IMG_AFFINE_SHEAR_HORIZONTAL
+ . IMG_AFFINE_SHEAR_VERTICAL
- - break $var;
- - continue $var;
+========================================
+10. Changes to INI File Handling
+========================================
-d. Removed hash algorithms
+- Core:
+ - Added sys_temp_dir INI directive, for specifying temporary
+ directory.
+
+- Intl:
+ - Added intl.use_exceptions INI directive, which controls what
+ happens when global errors are set together with intl.error_level.
+
+- MSSQL:
+ - mssql.compatability_mode renamed to mssql.compatibility_mode in 5.5.2,
+ old directive still supported for BC reasons.
+
+- 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.
+
+- Sessions:
+ - Added session.use_strict_mode in 5.5.3, which prevents session
+ fixation attacks and session collisions.
+ See also https://wiki.php.net/rfc/strict_sessions
+
+- Zend OPcache (See http://php.net/manual/en/book.opcache.php)
+ - Added the following directives:
+ - opcache.enable (default "1")
+ - opcache.memory_consumption (default "64")
+ - opcache.interned_strings_buffer (default "4")
+ - opcache.max_accelerated_files (default "2000")
+ - opcache.max_wasted_percentage (default "5")
+ - opcache.use_cwd (default "1")
+ - opcache.validate_timestamps (default "1")
+ - opcache.revalidate_freq (default "2")
+ - opcache.revalidate_path (default "0")
+ - opcache.save_comments (default "1")
+ - opcache.load_comments (default "1")
+ - opcache.fast_shutdown (default "0")
+ - opcache.enable_file_override (default "0")
+ - opcache.optimization_level (default "0xffffffff")
+ - opcache.inherited_hack (default "1")
+ - opcache.blacklist_filename (default "")
+ - opcache.max_file_size (default "0")
+ - opcache.consistency_checks (default "0")
+ - opcache.force_restart_timeout (default "180")
+ - opcache.error_log (default "" which means stderr)
+ - opcache.log_verbosity_level (default "1")
+ - opcache.preferred_memory_model (default "")
+ - opcache.protect_memory (default "0")
+ - opcache.mmap_base (Windows-only)
- - Salsa10 and Salsa20, which are actually stream ciphers
+========================================
+11. Windows Support
+========================================
-====================
-9. Extension Changes
-====================
+- The Apache 2.4 handler is supported as of PHP 5.5.0
-a. Extensions no longer maintained
+- OPcache: Errors like 'unable to reattach to base address' could
+ happen in many common setups. It is due to some technical and
+ design restriction in the engine and could not be fixed easily
+ before 5.5.0 was released.
- - ext/sqlite is no longer part of the base distribution and has been moved
- to PECL. Use sqlite3 or PDO_SQLITE instead.
+ A possible fix is to tweak the opcache.mmap_base INI setting by
+ forcing the first address to be tried.
-b. Extensions with changed behavior
+ For x86 version, the following addreses can be tried:
+ . 0x20000000, 0x21000000, 0x30000000, 0x31000000, 0x50000000
+ and for x64 (still experimental):
+ . 0x0000100000000000, 0x0000200000000000, 0x0000300000000000, 0x0000700000000000
- - The MySQL extensions (ext/mysql, mysqli and PDO_MYSQL) use mysqlnd
- as the default library now. It is still possible to use libmysql by
- specifying a path to the configure options.
+========================================
+12. Other Changes
+========================================
- - PDO_MYSQL: Support for linking with MySQL client libraries older
- than 4.1 is removed.
+- If the APC or WinCache user cache APIs were used before, consider
+ these alternatives for PHP 5.5:
- - The session extension now can hook into the file upload feature
- in order to provide upload progress information through session
- variables.
+ - APCu
+ - all supported OSes: http://pecl.php.net/package/APCu
+ - Windows: http://windows.php.net/downloads/pecl/releases/apcu/
- - SNMP extension
- - Functions in SNMP extension now returns FALSE on every error
- condition including SNMP-related (no such instance, end of MIB,
- etc). Thus, in patricular, breaks previous behavior of get/walk
- functions returning an empty string on SNMP-related errors.
- - Multi OID get/getnext/set queries are now supported.
- - New constants added for use in snmp_set_oid_output_format()
- function.
- - Function snmp_set_valueretrieval() changed it's behavior:
- SNMP_VALUE_OBJECT can be combined with one of
- SNMP_VALUE_PLAIN or SNMP_VALUE_LIBRARY resulting OID value
- changes. When no SNMP_VALUE_PLAIN or SNMP_VALUE_LIBRARY
- is supplied with SNMP_VALUE_OBJECT, SNMP_VALUE_LIBRARY is used.
- Prior to 5.4.0 when no SNMP_VALUE_PLAIN or SNMP_VALUE_LIBRARY
- was supplied with SNMP_VALUE_OBJECT, SNMP_VALUE_PLAIN was used.
- - Added feature-rich OO API (SNMP class)
- - Dropped UCD-SNMP compatibility code. Consider upgrading to
- net-snmp v5.3+. Net-SNMP v5.4+ is required for Windows version.
- - In sake of adding support for IPv6 DNS name resolution of
- remote SNMP agent (peer) is done by extension now, not by Net-SNMP
- library anymore.
-
- - Date extension
- - Setting the timezone with the TZ environment variable is no longer
- supported, instead date.timezone and/or date_default_timezone_set()
- have to be used.
- - The extension will no longer guess the default timezone if none
- is set with date.timezone and/or date_default_timezone_set().
- Instead it will always fall back to "UTC".
-
- - Hash extension
- - the output of the tiger hash family has been corrected, see
- https://bugs.php.net/61307
-
-===========================
-10. Changes in SAPI support
-===========================
-
-- A REQUEST_TIME_FLOAT value returns a floating point number indicating the
- time with microsecond precision. All SAPIs providing this value should be
- returning float and not time_t.
-
-- apache_child_terminate(), getallheaders(), apache_request_headers()
- and apache_response_headers() are now supported on FastCGI.
-
-- The interactive shell allows a shortcut #inisetting=value to change php.ini
- settings at run-time.
-
-- The interactive shell now works with the shared readline extension.
-
-- The interactive shell no longer terminates on fatal errors.
-
-- A new PHP CLI command line option --rz <name> shows information about the
- named Zend extension.
-
-===================
-11. Windows support
-===================
-
-- is_link now works properly for symbolic links on Windows Vista
- or later. Earlier systems do not support symbolic links.
-
-- As of PHP 5.4.5 and above the COM extension isn't compiled statically in PHP
- anymore but shared. It'll still be delivered with the standard PHP release but
- must be activated manually with the "extension = php_com_dotnet.dll" directive
- in php.ini.
-
-- Apache 2.4 handler is supported as of PHP 5.4.9
-
-==================
-12. New in PHP 5.4
-==================
-
-a. New Features
-
- - A built-in CLI web server for testing purposes is now available:
- $ php -S 127.0.0.1:8888
-
- - File Upload Progress support is implemented in the Session extension.
-
-b. Syntax additions
-
- - Traits:
- trait HelloWorld {
- public function sayHello() {
- echo 'Hello World!';
- }
- }
-
- class CanIGetHello {
- use HelloWorld;
- }
-
- $hello = new CanIGetHello();
- $hello->sayHello();
-
- - Function call result array access, e.g.:
- foo()[0]
- $foo->bar()[0]
-
- - Callable typehint indicating argument must be callable:
- function foo(callable $do) {
- }
- foo("strcmp");
- foo(function() {});
- $o = new ArrayObject();
- foo(array($o, "count"));
-
- - Short array syntax:
- $a = [1, 2, 3, 4];
- $a = ['one' => 1, 'two' => 2, 'three' => 3, 'four' => 4];
- $a = ['one' => 1, 2, 'three' => 3, 4];
-
- - Binary number format:
- 0b00100 0b010101
-
- - Chained string array offsets now work.
- $a = "abc";
- echo $a[0][0];
-
- - Anonymous functions now support using $this and class scope.
- Anonymous function can be declared as "static" to ignore the scope.
-
- - Class::{expr}() syntax is now supported:
- class A {
- static function foo() {
- echo "Hello world!\n";
- }
- }
- $x = "f";
- $y = "o";
- A::{$x.$y.$y}();
-
- - Class member access on instantiation:
- (new foo)->method()
- (new foo)->property
- (new foo)[0]
-
-
-c. New functions
-
- - Core:
- - get_declared_traits()
- - getimagesizefromstring()
- - hex2bin()
- - header_register_callback()
- - http_response_code()
- - stream_set_chunk_size()
- - socket_import_stream()
- - trait_exists()
-
- - Intl:
- - transliterator_create()
- - transliterator_create_from_rules()
- - transliterator_create_inverse()
- - transliterator_get_error_code()
- - transliterator_get_error_message()
- - transliterator_list_ids()
- - transliterator_transliterate()
-
- - LDAP:
- - ldap_control_paged_result()
- - ldap_control_paged_result_response()
-
- - libxml:
- - libxml_set_external_entity_loader()
-
- - mysqli:
- - mysqli_error_list()
- - mysqli_stmt_error_list()
-
- - pgsql
- - pg_escape_identifier() (5.4.4)
- - pg_escape_literal() (5.4.4)
-
- - Session:
- - session_register_shutdown()
- - session_status()
-
- - SPL
- - class_uses()
-
- - SplFixedArray
- - SplFixedArray::__wakeup() (5.4.18)
-
-d. New global constants
-
- - CURLOPT_MAX_RECV_SPEED_LARGE
- - CURLOPT_MAX_SEND_SPEED_LARGE
- - ENT_DISALLOWED
- - ENT_HTML401
- - ENT_HTML5
- - ENT_SUBSTITUTE
- - ENT_XHTML
- - ENT_XML1
- - IPPROTO_IP
- - IPPROTO_IPV6
- - IPV6_MULTICAST_HOPS
- - IPV6_MULTICAST_IF
- - IPV6_MULTICAST_LOOP
- - IP_MULTICAST_IF
- - IP_MULTICAST_LOOP
- - IP_MULTICAST_TTL
- - JSON_BIGINT_AS_STRING
- - JSON_OBJECT_AS_ARRAY
- - JSON_PRETTY_PRINT
- - JSON_UNESCAPED_SLASHES
- - JSON_UNESCAPED_UNICODE
- - LIBXML_HTML_NODEFDTD
- - LIBXML_HTML_NOIMPLIED
- - LIBXML_PEDANTIC
- - MCAST_JOIN_GROUP
- - MCAST_LEAVE_GROUP
- - MCAST_BLOCK_SOURCE
- - MCAST_UNBLOCK_SOURCE
- - MCAST_JOIN_SOURCE_GROUP
- - MCAST_LEAVE_SOURCE_GROUP
- - OPENSSL_CIPHER_AES_128_CBC
- - OPENSSL_CIPHER_AES_192_CBC
- - OPENSSL_CIPHER_AES_256_CBC
- - OPENSSL_RAW_DATA
- - OPENSSL_ZERO_PADDING
- - PHP_OUTPUT_HANDLER_CLEAN
- - PHP_OUTPUT_HANDLER_CLEANABLE
- - PHP_OUTPUT_HANDLER_DISABLED
- - PHP_OUTPUT_HANDLER_FINAL
- - PHP_OUTPUT_HANDLER_FLUSH
- - PHP_OUTPUT_HANDLER_FLUSHABLE
- - PHP_OUTPUT_HANDLER_REMOVABLE
- - PHP_OUTPUT_HANDLER_STARTED
- - PHP_OUTPUT_HANDLER_STDFLAGS
- - PHP_OUTPUT_HANDLER_WRITE
- - PHP_QUERY_RFC1738
- - PHP_QUERY_RFC3986
- - PHP_SESSION_ACTIVE
- - PHP_SESSION_DISABLED
- - PHP_SESSION_NONE
- - SCANDIR_SORT_ASCENDING
- - SCANDIR_SORT_DESCENDING
- - SCANDIR_SORT_NONE
- - SORT_FLAG_CASE
- - SORT_NATURAL
- - STREAM_META_ACCESS
- - STREAM_META_GROUP
- - STREAM_META_GROUP_NAME
- - STREAM_META_OWNER
- - STREAM_META_OWNER_NAME
- - STREAM_META_TOUCH
- - T_CALLABLE
- - T_INSTEADOF
- - T_TRAIT
- - T_TRAIT_C
- - ZLIB_ENCODING_DEFLATE
- - ZLIB_ENCODING_GZIP
- - ZLIB_ENCODING_RAW
- - U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR
- - IDNA_CHECK_BIDI
- - IDNA_CHECK_CONTEXTJ
- - IDNA_NONTRANSITIONAL_TO_ASCII
- - IDNA_NONTRANSITIONAL_TO_UNICODE
- - INTL_IDNA_VARIANT_2003
- - INTL_IDNA_VARIANT_UTS46
- - IDNA_ERROR_EMPTY_LABEL
- - IDNA_ERROR_LABEL_TOO_LONG
- - IDNA_ERROR_DOMAIN_NAME_TOO_LONG
- - IDNA_ERROR_LEADING_HYPHEN
- - IDNA_ERROR_TRAILING_HYPHEN
- - IDNA_ERROR_HYPHEN_3_4
- - IDNA_ERROR_LEADING_COMBINING_MARK
- - IDNA_ERROR_DISALLOWED
- - IDNA_ERROR_PUNYCODE
- - IDNA_ERROR_LABEL_HAS_DOT
- - IDNA_ERROR_INVALID_ACE_LABEL
- - IDNA_ERROR_BIDI
- - IDNA_ERROR_CONTEXTJ
-
-e. New classes
-
- - Reflection:
- - ReflectionZendExtension
-
- - Intl:
- - Transliterator
- - Spoofchecker
-
- - JSON:
- - JsonSerializable
-
- - Session:
- - SessionHandler
-
- - SNMP:
- - SNMP
-
- - SPL:
- - CallbackFilterIterator
- - RecursiveCallbackFilterIterator
-
-f. New methods
-
- - Closure:
- - Closure::bind()
- - Closure::bindTo()
-
- - Reflection:
- - ReflectionClass::getTraitAliases()
- - ReflectionClass::getTraitNames()
- - ReflectionClass::getTraits()
- - ReflectionClass::isCloneable()
- - ReflectionClass::isTrait()
- - ReflectionClass::newInstanceWithoutConstructor()
- - ReflectionExtension::isPersistent()
- - ReflectionExtension::isTemporary()
- - ReflectionFunction::getClosure()
- - ReflectionFunction::getClosureScopeClass()
- - ReflectionFunction::getClosureThis()
- - ReflectionFunctionAbstract::getClosureScopeClass()
- - ReflectionFunctionAbstract::getClosureThis()
- - ReflectionMethod::getClosure()
- - ReflectionMethod::getClosureScopeClass()
- - ReflectionMethod::getClosureThis()
- - ReflectionObject::getTraitAliases()
- - ReflectionObject::getTraitNames()
- - ReflectionObject::getTraits()
- - ReflectionObject::isCloneable()
- - ReflectionObject::isTrait()
- - ReflectionObject::newInstanceWithoutConstructor()
- - ReflectionParameter::canBePassedByValue()
- - ReflectionParameter::isCallable()
-
- - PDO_DBLIB:
- - PDO::newRowset()
-
- - SPL:
- - DirectoryIterator::getExtension()
- - RegexIterator::getRegex()
- - SplDoublyLinkedList::serialize()
- - SplDoublyLinkedList::unserialize()
- - SplFileInfo::getExtension()
- - SplFileObject::fputcsv()
- - SplObjectStorage::getHash()
- - SplQueue::serialize
- - SplQueue::unserialize
- - SplStack::serialize
- - SplStack::unserialize
- - SplTempFileObject::fputcsv
-
- - XSLT:
- - XsltProcessor::setSecurityPrefs()
- - XsltProcessor::getSecurityPrefs()
-
- - Zlib:
- - zlib_decode()
- - zlib_encode()
-
-g. New Hash algorithms
-
- - fnv132
- - fnv164
- - joaat
+ - WinCache, Windows only: http://pecl.php.net/package/WinCache