Annotation of embedaddon/php/UPGRADING, revision 1.1.1.5

1.1.1.2   misho       1: $Id$
1.1       misho       2: 
1.1.1.2   misho       3: PHP 5.4 UPGRADE NOTES
1.1       misho       4: 
1.1.1.2   misho       5: ===========
                      6: 0. Contents
                      7: ===========
                      8: 
                      9: 1. Changes to INI directives
                     10: 2. Changes to reserved words and classes
                     11: 3. Changes to engine behavior
                     12: 4. Changes to existing functions
                     13: 5. Changes to existing classes
                     14: 6. Changes to existing methods
                     15: 7. Deprecated Functionality
                     16: 8. Removed Functionality
                     17:      a. Removed features
                     18:      b. Removed functions
                     19:      c. Removed syntax
                     20:      d. Removed hash algorithms
                     21: 9. Extension Changes:
                     22:      a. Extensions no longer maintained
                     23:      b. Extensions with changed behavior
                     24: 10. Changes in SAPI support
1.1       misho      25: 11. Windows support
1.1.1.2   misho      26: 12. New in PHP 5.4:
                     27:      a. New features
                     28:      b. Syntax additions
                     29:      c. New functions
                     30:      d. New global constants
                     31:      e. New classes
                     32:      f. New methods
                     33:      g. New hash algorithms
1.1       misho      34: 
                     35: =============================
1.1.1.2   misho      36: 1. Changes to INI directives
1.1       misho      37: =============================
                     38: 
1.1.1.2   misho      39: - PHP 5.4 now checks at compile time if /dev/urandom or /dev/arandom
1.1.1.3   misho      40:   are present. If either is available, session.entropy_file now
1.1.1.2   misho      41:   defaults to that file and session.entropy_length defaults to 32.
1.1.1.3   misho      42:   This provides non-blocking entropy to session id generation. If you
1.1.1.2   misho      43:   do not want extra entropy for your session ids, add:
                     44: 
                     45:     session.entropy_file=
                     46:     session.entropy_length=0
                     47: 
                     48:   to your php.ini to preserve pre-PHP 5.4 behavior.
                     49: 
                     50: - Deprecated php.ini directives will now throw an E_CORE_WARNING's
                     51:   instead of the previous E_WARNING's.
                     52: 
                     53: - The following php.ini directives are no longer available in PHP 5.4
                     54:   and will now throw an E_CORE_ERROR upon startup:
                     55:   - allow_call_time_pass_reference
                     56:   - define_syslog_variables
                     57:   - highlight.bg
                     58:   - magic_quotes_gpc
                     59:   - magic_quotes_runtime
                     60:   - magic_quotes_sybase
                     61:   - register_globals
                     62:   - register_long_arrays
                     63:   - safe_mode
                     64:   - safe_mode_gid
                     65:   - safe_mode_include_dir
                     66:   - safe_mode_exec_dir
                     67:   - safe_mode_allowed_env_vars
                     68:   - safe_mode_protected_env_vars
                     69:   - session.bug_compat_42
                     70:   - session.bug_compat_warn
                     71:   - y2k_compliance
                     72:   - zend.ze1_compatibility_mode
                     73: 
                     74: - the following new php.ini directives were added:
                     75:   - max_input_vars - specifies how many GET/POST/COOKIE input
                     76:     variables may be accepted. The default value is 1000.
                     77: 
                     78: - E_ALL now includes E_STRICT.
                     79: 
                     80: - The recommended production value for error_reporting changed to E_ALL &
                     81:   ~E_DEPRECATED & ~E_STRICT.
                     82: 
                     83: - Added new session support directives:
                     84:     session.upload_progress.enabled
                     85:     session.upload_progress.cleanup
                     86:     session.upload_progress.prefix
                     87:     session.upload_progress.name
                     88:     session.upload_progress.freq
                     89:     session.upload_progress.min_freq
                     90: 
                     91: - Added a zend.multibyte directive as a replacement of the PHP compile time
1.1.1.3   misho      92:   configuration option --enable-zend-multibyte. Now the Zend Engine always
1.1.1.2   misho      93:   contains code for multibyte support, which can be enabled or disabled at
1.1.1.3   misho      94:   runtime. Note: It doesn't make a lot of sense to enable this option if
1.1.1.2   misho      95:   ext/mbstring is not enabled, because most functionality is implemented by
                     96:   mbstrings callbacks.
                     97: 
                     98: - Added zend.script_encoding. This value will be used unless a
                     99:   "declare(encoding=...)" directive appears at the top of the script.
                    100: 
                    101: - Added zend.signal_check to check for replaced signal handlers on shutdown
                    102: 
                    103: - Added enable_post_data_reading, which is enabled by default. When it's
                    104:   disabled, the POST data is not read (or processed); the behavior is similar
                    105:   to that of other request methods with body, like PUT. This allows reading
                    106:   the raw POST data in multipart requests and reading/processing the POST data
                    107:   in a stream fashion (through php://input) without having it copied in memory
                    108:   multiple times.
                    109: 
1.1.1.3   misho     110: - Added windows_show_crt_warning. This directive shows the CRT warnings when
1.1.1.2   misho     111:   enabled. These warnings were displayed by default until now. It is disabled
                    112:   by default.
                    113: 
                    114: - Added cli.pager to set a pager for CLI interactive shell output.
                    115: 
                    116: - Added cli.prompt to configure the CLI interactive shell prompt.
                    117: 
                    118: - Added cli_server.color to enable the CLI web server to use ANSI color coding
                    119:   in terminal output.
                    120: 
                    121: ========================================
                    122: 2. Changes to reserved words and classes
                    123: ========================================
1.1       misho     124: 
1.1.1.2   misho     125: - "callable", "insteadof" and "trait" are now reserved words.
1.1       misho     126: 
1.1.1.2   misho     127: =============================
                    128: 3. Changes to engine behavior
                    129: =============================
1.1       misho     130: 
1.1.1.2   misho     131: - The __construct arguments of an extended abstract constructor must
                    132:   now match:
1.1       misho     133: 
1.1.1.2   misho     134:   abstract class Base
                    135:   {
                    136:     abstract public function __construct();
                    137:   }
                    138:   class Foo extends Base
                    139:   {
                    140:     public function __construct($bar) {}
                    141:   }
                    142: 
                    143:   This now emits a Fatal error due the incompatible declaration.
                    144: 
                    145: - In previous versions, superglobal names could be used for parameter
                    146:   names, thereby shadowing the corresponding superglobal. In PHP 5.4
                    147:   this now causes a fatal error such as "Cannot re-assign auto-global
                    148:   variable GLOBALS".
                    149: 
                    150: - Turning null, false or an empty string into an object by adding a
                    151:   property will now emit a warning instead of an E_STRICT error.
                    152: 
                    153:   $test = null;
                    154:   $test->baz = 1;
                    155: 
                    156:   To create a generic object you can use StdClass:
                    157: 
                    158:   $test = new StdClass;
                    159:   $test->baz = 1;
                    160: 
                    161: - Converting an array to a string now will cause an E_NOTICE warning.
                    162: 
                    163: - Non-numeric string offsets, e.g. $a['foo'] where $a is a string, now
                    164:   return false on isset() and true on empty(), and produce warning if
1.1.1.3   misho     165:   trying to use them. Offsets of types double, bool and null produce
1.1.1.2   misho     166:   notice. Numeric strings ($a['2']) still work as before.
                    167: 
                    168:   Note that offsets like '12.3' and '5 and a half' are considered
                    169:   non-numeric and produce warning, but are converted to 12 and 5
                    170:   respectively for backwards compatibility reasons.
                    171: 
1.1.1.3   misho     172: - Long numeric strings that do not fit in integer or double (such as
                    173:   "92233720368547758070") are compared using string comparison if 
                    174:   they could otherwise result in precision loss - since 5.4.4.
                    175: 
1.1.1.2   misho     176: - Closures now support scopes and $this and can be rebound to
                    177:   objects using Closure::bind() and Closure::bindTo().
                    178: 
                    179: - <?= is now always available regardless of the short_open_tag
                    180:   setting.
                    181: 
                    182: - Parse error messages are changed to contain more information about
                    183:   the error.
                    184: 
1.1.1.3   misho     185: - __clone and __destruct since 5.4.4 follow the same scoping rules as 
                    186:   the rest of the methods (see bug #61782 for details).
                    187: 
1.1.1.2   misho     188: ================================
                    189: 4. Changes to existing functions
                    190: ================================
                    191: 
                    192: - array_combine now returns array() instead of FALSE when two empty arrays are
                    193:   provided as parameters.
                    194: 
                    195: - dns_get_record() has an extra parameter which allows requesting DNS records
                    196:   by numeric type and makes the result include only the raw data of the
                    197:   response.
                    198: 
                    199: - call_user_func_array() no longer allows call-time pass by reference.
                    200: 
                    201: - the default character set for htmlspecialchars() and htmlentities() is
                    202:   now UTF-8. In previous versions it was ISO-8859-1. Note that changing
                    203:   your output charset via the php.ini default_charset directive does not
                    204:   affect htmlspecialchars/htmlentities unless you are passing "" (an 
                    205:   empty string) as the encoding parameter to your htmlspecialchars/htmlentities
                    206:   calls. 
                    207: 
                    208: - htmlentities() and htmlspecialchars() are stricter in the code units they
                    209:   accept for the asian encodings. For Big5-HKSCS, the octets 0x80 and 0xFF are
1.1.1.3   misho     210:   rejected. For GB2312/EUC-CN, the octets 0x8E, 0x8F, 0xA0 and 0xFF are
1.1.1.2   misho     211:   rejected. For SJIS, the octets 0x80, 0xA0, 0xFD, 0xFE and 0xFF are rejected,
                    212:   except maybe after a valid starting byte. For EUC-JP, the octets 0xA0 and
                    213:   0xFF are rejected.
                    214: 
                    215: - htmlentities() now emits an E_STRICT warning when used with asian characters,
                    216:   as in that case htmlentities has (and already had before this version) the
                    217:   same functionality as htmlspecialchars.
                    218: 
                    219: - htmlentities() no longer numerically encodes high characters for single-byte
                    220:   encodings (except when there's actually a corresponding named entity). This
                    221:   behavior was not documented and was inconsistent with that for "UTF-8".
                    222: 
                    223: - html_entity_decode() and htmlspecialchars_decode() behave more consistently,
                    224:   now decoding entities in malformed strings such as "&&amp;" or "&#&amp;".
                    225: 
                    226: - htmlentities(), htmlspecialchars(), html_entity_decode(), and
                    227:   htmlspecialchars_decode: Added the flags ENT_HTML401, ENT_XML1, ENT_XHTML,
                    228:   and ENT_HTML5. The behavior of these functions including, but not limited to,
                    229:   the characters that are encoded and the entities that are decoded depend on
                    230:   the document type that is specified by those flags.
                    231: 
                    232: - htmlentities() and htmlspecialchars() with !$double_encode do more strict
                    233:   checks on the validity of the entities. Numerical entities are checked for a
                    234:   valid range (0 to 0x10FFFF); if the flag ENT_DISALLOWED is given, the
                    235:   validity of such numerical entity in the target document type is also
1.1.1.3   misho     236:   checked. Named entities are checked for necessary existence in the target
1.1.1.2   misho     237:   document type instead of only checking whether they were constituted by
                    238:   alphanumeric characters.
                    239: 
                    240: - The flag ENT_DISALLOWED was added. In addition to the behavior described in
                    241:   the item before, it also makes htmlentities() and htmlspecialchars()
                    242:   substitute characters that appear literally in the argument string and which
                    243:   are not allowed in the target document type with U+FFFD (UTF-8) or &#xFFFD;.
                    244: 
                    245: - The flag ENT_SUBSTITUTE was added. This flag makes invalid multibyte
                    246:   sequences be replaced by U+FFFD (UTF-8) or &#FFFD; by htmlspecialchars() and
                    247:   htmlentities(). It is an alternative to the default behavior, which just
                    248:   returns an empty string and to ENT_IGNORE, which is a security risk. The
                    249:   behavior follows the recommendations of Unicode Technical Report #36.
                    250: 
                    251: - htmlspecialchars_decode() and html_entity_decode() now decode &apos; if the
                    252:   document type is ENT_XML1, ENT_XHTML, or ENT_HTML5.
                    253: 
                    254: - Charset detection with $charset == '' no longer turns to mbstring's
                    255:   internal encoding defined through mb_internal_encoding(). Only the encoding
                    256:   defined through the php.ini setting mbstring.internal_encoding is considered.
                    257: 
                    258: - number_format() no longer truncates multibyte decimal points and thousand
                    259:   separators to the first byte.
                    260: 
                    261: - The third parameter ($matches) to preg_match_all() is now optional. If
                    262:   omitted, the function will simply return the number of times the pattern was
                    263:   matched in the subject and will have no other side effects.
                    264: 
                    265: - The second argument of scandir() now accepts SCANDIR_SORT_NONE (2) as a
                    266:   possible value. This value results in scandir() performing no sorting: on
                    267:   local filesystems, this allows files to be returned in native filesystem
                    268:   order.
                    269: 
                    270: - stream_select() now preserves the keys of the passed array, be they numeric or
                    271:   strings. This breaks code that iterated the resulting stream array using a
                    272:   numeric index, but makes easier to identify which of the passed streams are
                    273:   present in the result.
                    274: 
                    275: - stream_set_write_buffer() no longer disables the read buffer of a plain
                    276:   stream when 0 is given as the second argument.
                    277: 
                    278: - stream_set_write_buffer() no longer changes the chunk size in socket streams.
                    279: 
                    280: - fclose() closes streams with resource refcount > 1; it doesn't merely
                    281:   decrement the resource refcount.
                    282: 
                    283: - socket_set_options() and socket_get_options() now support multicast options.
                    284: 
                    285: - The raw data parameter in openssl_encrypt() and openssl_decrypt() is now an
                    286:   options integer rather than a boolean. A value of true produces the same
                    287:   behavior.
1.1       misho     288: 
                    289: - Write operations within XSLT (for example with the extension sax:output) are
1.1.1.2   misho     290:   disabled by default. You can define what is forbidden with the method
                    291:   XsltProcess::setSecurityPrefs($options).
1.1       misho     292: 
1.1.1.2   misho     293: - Added AES support to OpenSSL.
1.1       misho     294: 
1.1.1.2   misho     295: - openssl_csr_new() expects the textual data to be in UTF-8.
1.1       misho     296: 
1.1.1.2   misho     297: - Added no-padding option to openssl_encrypt() and openssl_decrypt().
1.1       misho     298: 
1.1.1.2   misho     299: - Added a "no_ticket" SSL context option to disable the SessionTicket TLS
                    300:   extension.
1.1       misho     301: 
1.1.1.2   misho     302: - Added new json_encode() options: JSON_PRETTY_PRINT, JSON_UNESCAPED_SLASHES,
                    303:   JSON_NUMERIC_CHECK, JSON_BIGINT_AS_STRING, JSON_UNESCAPED_UNICODE.
1.1       misho     304: 
1.1.1.2   misho     305: - Added Tokyo Cabinet and Berkley DB 5 support to DBA extension.
1.1       misho     306: 
1.1.1.2   misho     307: - Added support for CURLOPT_MAX_SEND_SPEED_LARGE and CURLOPT_MAX_RECV_SPEED_LARGE
                    308:   to cURL.
1.1       misho     309: 
1.1.1.2   misho     310: - Added optional argument to debug_backtrace() and debug_print_backtrace()
                    311:   to limit the amount of stack frames returned.
1.1       misho     312: 
1.1.1.2   misho     313: - Fixed crypt_blowfish handling of 8-bit characters. crypt() in Blowfish mode
                    314:   now supports hashes marked $2a$, $2x$, $2y$ and $2z$.
1.1       misho     315: 
1.1.1.2   misho     316: - mbstring now supports following encodings: Shift_JIS/UTF-8 Emoji,
                    317:   JIS X0213:2004 (Shift_JIS-2004, EUC-JP-2004, ISO-2022-JP-2004),
                    318:   MacJapanese (Shift_JIS), gb18030.
1.1       misho     319: 
1.1.1.2   misho     320: - Added encode and decode in hex format to mb_encode_numericentity() and
                    321:   mb_decode_numericentity().
1.1       misho     322: 
1.1.1.2   misho     323: - Added support for SORT_NATURAL and SORT_FLAG_CASE in array sort functions:
                    324:   sort(), rsort(), ksort(), krsort(), asort(), arsort() and array_multisort().
1.1       misho     325: 
1.1.1.2   misho     326: - is_a() and is_subclass_of() now have third boolean parameter, which specifies
                    327:   if the first argument can be a string class name. Default if false for is_a
                    328:   and true for is_subclass_of() for BC reasons.
1.1       misho     329: 
1.1.1.2   misho     330: - ob_start() will now treat a chunk size of 1 as meaning 1 byte, rather than
                    331:   the previous special case behavior of treating it as 4096 bytes.
1.1       misho     332: 
1.1.1.2   misho     333: - idn_to_ascii() and idn_to_utf8() now take two extra parameters, one indicating
                    334:   the variant (IDNA 2003 or UTS #46) and another, passed by reference, to return
                    335:   details about the operation in case UTS #46 is chosen.
1.1       misho     336: 
1.1.1.2   misho     337: - gzencode() used with FORCE_DEFLATE now generates RFC1950 compliant data.
1.1       misho     338: 
1.1.1.2   misho     339: - ob_start() no longer starts multiple output buffers when passed
                    340:   array("callback1", "callback2", "callback3", ...).
1.1       misho     341: 
1.1.1.3   misho     342: - Since 5.4.4, "php://fd" stream syntax is available only in CLI build.
                    343: 
                    344: - Since 5.4.5, resourcebundle_create() accepts null for the first two arguments.
                    345: 
                    346: - Since 5.4.6, SimpleXMLElement::getDocNamespaces() has and extra parameter which
                    347:   allows for toggling if the list of namespaces starts from the document root
                    348:   or from the node you call the method on
                    349: 
                    350: - Since 5.4.7, ctor is always called when new user stream wrapper object is created.
                    351:   Before, it was called only when stream_open was called.
                    352: 
1.1.1.5 ! misho     353: - Manipulated serialization strings for objects implementing Serializable by
        !           354:   replacing "C:" with "O:" at the start will now produce an error.
        !           355: 
1.1.1.2   misho     356: ==============================
                    357: 5. Changes to existing classes
                    358: ==============================
1.1       misho     359: 
1.1.1.2   misho     360: - Classes that implement stream wrappers can define a method called
                    361:   stream_truncate that will respond to truncation, e.g. through ftruncate.
                    362:   Strictly speaking, this is an addition to the user-space stream wrapper
                    363:   template, not a change to an actual class.
1.1       misho     364: 
1.1.1.2   misho     365: - Classes that implement stream wrappers can define a method called
                    366:   stream_metadata that will be called on touch(), chmod(), chgrp(), chown().
1.1       misho     367: 
1.1.1.2   misho     368: - Arrays cast from SimpleXMLElement now always contain all nodes instead of
                    369:   just the first matching node.
1.1       misho     370: 
1.1.1.2   misho     371: - All SimpleXMLElement children are now always printed when using var_dump(),
                    372:   var_export(), and print_r().
1.1       misho     373: 
1.1.1.2   misho     374: - Added iterator support in MySQLi. mysqli_result implements Traversable.
1.1       misho     375: 
1.1.1.2   misho     376: ==============================
                    377: 6. Changes to existing methods
                    378: ==============================
1.1       misho     379: 
1.1.1.2   misho     380: - DateTime::parseFromFormat() now has a "+" modifier to allow trailing text in
                    381:   the string to parse without throwing an error.
1.1       misho     382: 
1.1.1.2   misho     383: - Added the ability to pass options to DOMDocument::loadHTML().
1.1       misho     384: 
1.1.1.2   misho     385: - FilesystemIterator, GlobIterator and (Recursive)DirectoryIterator now use
                    386:   the default stream context.
1.1       misho     387: 
1.1.1.3   misho     388: - Since 5.4.5, the constructor of ResourceBundle accepts NULL for the first two
                    389:   arguments.
                    390: 
1.1.1.2   misho     391: ===========================
                    392: 7. Deprecated Functionality
                    393: ===========================
1.1       misho     394: 
1.1.1.2   misho     395: - The following functions are deprecated in PHP 5.4:
                    396:   - mcrypt_generic_end():       use mcrypt_generic_deinit() instead
                    397:   - mysql_list_dbs()
1.1       misho     398: 
1.1.1.2   misho     399: ========================
                    400: 8. Removed Functionality
                    401: ========================
1.1       misho     402: 
1.1.1.2   misho     403: a. Removed features
1.1       misho     404: 
1.1.1.2   misho     405:    The following features have been removed from PHP 5.4:
1.1       misho     406: 
1.1.1.2   misho     407:    - Magic quotes
                    408:    - Register globals
                    409:    - Safe mode
                    410:    - Session extension bug compatibility mode
                    411:    - Y2K compliance mode
1.1       misho     412: 
1.1.1.2   misho     413: b. Removed functions
1.1       misho     414: 
1.1.1.2   misho     415:    The following functions are no longer available in PHP 5.4:
1.1       misho     416: 
1.1.1.2   misho     417:    - define_syslog_variables()
                    418:    - import_request_variables()
                    419:    - session_is_registered()
                    420:    - session_register()
                    421:    - session_unregister()
                    422:    - set_magic_quotes_runtime()
                    423:    - mysqli_bind_param() (alias of mysqli_stmt_bind_param())
                    424:    - mysqli_bind_result() (alias of mysqli_stmt_bind_result())
                    425:    - mysqli_client_encoding() (alias of mysqli_character_set_name())
                    426:    - mysqli_fetch() (alias of mysqli_stmt_fetch())
                    427:    - mysqli_param_count() (alias of mysqli_stmt_param_count())
                    428:    - mysqli_get_metadata() (alias of mysqli_stmt_result_metadata())
                    429:    - mysqli_send_long_data() (alias of mysqli_stmt_send_long_data())
                    430:    - mysqli::client_encoding() (alias of mysqli::character_set_name)
                    431:    - mysqli_stmt::stmt() (never worked/always throws, undocumented)
1.1       misho     432: 
1.1.1.2   misho     433: c. Removed syntax
1.1       misho     434: 
1.1.1.2   misho     435:    - break $var;
                    436:    - continue $var;
1.1       misho     437: 
1.1.1.2   misho     438: d. Removed hash algorithms
1.1       misho     439: 
1.1.1.2   misho     440:    - Salsa10 and Salsa20, which are actually stream ciphers
1.1       misho     441: 
                    442: ====================
1.1.1.2   misho     443: 9. Extension Changes
1.1       misho     444: ====================
                    445: 
1.1.1.2   misho     446: a. Extensions no longer maintained
1.1       misho     447: 
1.1.1.2   misho     448:    - ext/sqlite is no longer part of the base distribution and has been moved
1.1.1.3   misho     449:      to PECL. Use sqlite3 or PDO_SQLITE instead.
1.1       misho     450: 
1.1.1.2   misho     451: b. Extensions with changed behavior
1.1       misho     452: 
1.1.1.2   misho     453:    - The MySQL extensions (ext/mysql, mysqli and PDO_MYSQL) use mysqlnd
                    454:      as the default library now. It is still possible to use libmysql by
                    455:      specifying a path to the configure options.
                    456: 
                    457:    - PDO_MYSQL: Support for linking with MySQL client libraries older
                    458:      than 4.1 is removed.
                    459: 
                    460:    - The session extension now can hook into the file upload feature
                    461:      in order to provide upload progress information through session
                    462:      variables.
                    463: 
                    464:    - SNMP extension
                    465:      - Functions in SNMP extension now returns FALSE on every error
                    466:        condition including SNMP-related (no such instance, end of MIB,
                    467:        etc). Thus, in patricular, breaks previous behavior of get/walk
                    468:        functions returning an empty string on SNMP-related errors.
                    469:      - Multi OID get/getnext/set queries are now supported.
                    470:      - New constants added for use in snmp_set_oid_output_format()
                    471:        function.
                    472:      - Function snmp_set_valueretrieval() changed it's behavior:
                    473:            SNMP_VALUE_OBJECT can be combined with one of
                    474:            SNMP_VALUE_PLAIN or SNMP_VALUE_LIBRARY resulting OID value
                    475:            changes. When no SNMP_VALUE_PLAIN or SNMP_VALUE_LIBRARY
                    476:            is supplied with SNMP_VALUE_OBJECT, SNMP_VALUE_LIBRARY is used.
                    477:            Prior to 5.4.0 when no SNMP_VALUE_PLAIN or SNMP_VALUE_LIBRARY
                    478:            was supplied with SNMP_VALUE_OBJECT, SNMP_VALUE_PLAIN was used.
                    479:      - Added feature-rich OO API (SNMP class)
                    480:      - Dropped UCD-SNMP compatibility code. Consider upgrading to
                    481:        net-snmp v5.3+. Net-SNMP v5.4+ is required for Windows version.
                    482:      - In sake of adding support for IPv6 DNS name resolution of
                    483:        remote SNMP agent (peer) is done by extension now, not by Net-SNMP
                    484:        library anymore.
                    485: 
                    486:    - Date extension
                    487:      - Setting the timezone with the TZ environment variable is no longer
                    488:        supported, instead date.timezone and/or date_default_timezone_set()
                    489:        have to be used.
                    490:      - The extension will no longer guess the default timezone if none
                    491:        is set with date.timezone and/or date_default_timezone_set().
                    492:        Instead it will always fall back to "UTC".
                    493: 
                    494:    - Hash extension
                    495:      - the output of the tiger hash family has been corrected, see
                    496:        https://bugs.php.net/61307
                    497: 
                    498: ===========================
                    499: 10. Changes in SAPI support
                    500: ===========================
                    501: 
                    502: - A REQUEST_TIME_FLOAT value returns a floating point number indicating the
1.1.1.3   misho     503:   time with microsecond precision. All SAPIs providing this value should be
1.1.1.2   misho     504:   returning float and not time_t.
                    505: 
                    506: - apache_child_terminate(), getallheaders(), apache_request_headers()
                    507:   and apache_response_headers() are now supported on FastCGI.
                    508: 
                    509: - The interactive shell allows a shortcut #inisetting=value to change php.ini
                    510:   settings at run-time.
1.1       misho     511: 
1.1.1.2   misho     512: - The interactive shell now works with the shared readline extension.
1.1       misho     513: 
1.1.1.2   misho     514: - The interactive shell no longer terminates on fatal errors.
1.1       misho     515: 
1.1.1.2   misho     516: - A new PHP CLI command line option --rz <name> shows information about the
                    517:   named Zend extension.
1.1       misho     518: 
1.1.1.2   misho     519: ===================
                    520: 11. Windows support
                    521: ===================
1.1       misho     522: 
1.1.1.2   misho     523: - is_link now works properly for symbolic links on Windows Vista
                    524:   or later. Earlier systems do not support symbolic links.
1.1       misho     525: 
1.1.1.3   misho     526: - As of PHP 5.4.5 and above the COM extension isn't compiled statically in PHP
                    527:   anymore but shared. It'll still be delivered with the standard PHP release but
                    528:   must be activated manually with the "extension = php_com_dotnet.dll" directive
                    529:   in php.ini.
                    530: 
                    531: - Apache 2.4 handler is supported as of PHP 5.4.9
                    532: 
1.1.1.2   misho     533: ==================
                    534: 12. New in PHP 5.4
                    535: ==================
1.1       misho     536: 
1.1.1.2   misho     537: a. New Features
1.1       misho     538: 
1.1.1.2   misho     539:   - A built-in CLI web server for testing purposes is now available:
                    540:      $ php -S 127.0.0.1:8888
1.1       misho     541: 
1.1.1.2   misho     542:   - File Upload Progress support is implemented in the Session extension.
1.1       misho     543: 
1.1.1.2   misho     544: b. Syntax additions
1.1       misho     545: 
1.1.1.2   misho     546:   - Traits:
                    547:       trait HelloWorld {
                    548:          public function sayHello() {
                    549:              echo 'Hello World!';
                    550:          }
                    551:       }
1.1       misho     552: 
1.1.1.2   misho     553:       class CanIGetHello {
                    554:          use HelloWorld;
                    555:       }
1.1       misho     556: 
1.1.1.2   misho     557:       $hello = new CanIGetHello();
                    558:       $hello->sayHello();
1.1       misho     559: 
1.1.1.2   misho     560:   - Function call result array access, e.g.:
                    561:       foo()[0]
                    562:       $foo->bar()[0]
1.1       misho     563: 
1.1.1.2   misho     564:   - Callable typehint indicating argument must be callable:
                    565:       function foo(callable $do) {
                    566:       }
                    567:       foo("strcmp");
                    568:       foo(function() {});
                    569:       $o = new ArrayObject();
                    570:       foo(array($o, "count"));
                    571: 
                    572:   - Short array syntax:
                    573:       $a = [1, 2, 3, 4];
                    574:       $a = ['one' => 1, 'two' => 2, 'three' => 3, 'four' => 4];
                    575:       $a = ['one' => 1, 2, 'three' => 3, 4];
                    576: 
                    577:   - Binary number format:
                    578:       0b00100 0b010101
                    579: 
                    580:   - Chained string array offsets now work.
                    581:       $a = "abc";
                    582:       echo $a[0][0];
                    583: 
                    584:   - Anonymous functions now support using $this and class scope.
                    585:     Anonymous function can be declared as "static" to ignore the scope.
                    586: 
                    587:   - Class::{expr}() syntax is now supported:
                    588:       class A {
                    589:          static function foo() {
                    590:              echo "Hello world!\n";
                    591:          }
                    592:       }
                    593:       $x = "f";
                    594:       $y = "o";
                    595:       A::{$x.$y.$y}();
                    596: 
                    597:   - Class member access on instantiation:
                    598:       (new foo)->method()
                    599:       (new foo)->property
                    600:       (new foo)[0]
                    601: 
                    602: 
                    603: c. New functions
                    604: 
                    605:   - Core:
                    606:     - get_declared_traits()
                    607:     - getimagesizefromstring()
                    608:     - hex2bin()
                    609:     - header_register_callback()
                    610:     - http_response_code()
                    611:     - stream_set_chunk_size()
                    612:     - socket_import_stream()
                    613:     - trait_exists()
                    614: 
                    615:   - Intl:
                    616:     - transliterator_create()
                    617:     - transliterator_create_from_rules()
                    618:     - transliterator_create_inverse()
                    619:     - transliterator_get_error_code()
                    620:     - transliterator_get_error_message()
                    621:     - transliterator_list_ids()
                    622:     - transliterator_transliterate()
                    623: 
                    624:   - LDAP:
                    625:     - ldap_control_paged_result()
                    626:     - ldap_control_paged_result_response()
1.1.1.5 ! misho     627:     - ldap_modify_batch (5.4.26)
1.1.1.2   misho     628: 
                    629:   - libxml:
                    630:     - libxml_set_external_entity_loader()
                    631: 
                    632:   - mysqli:
                    633:     - mysqli_error_list()
                    634:     - mysqli_stmt_error_list()
                    635: 
1.1.1.3   misho     636:   - pgsql
                    637:     - pg_escape_identifier() (5.4.4)
                    638:     - pg_escape_literal() (5.4.4)
                    639: 
1.1.1.2   misho     640:   - Session:
                    641:     - session_register_shutdown()
                    642:     - session_status()
                    643: 
                    644:   - SPL
                    645:     - class_uses()
                    646: 
1.1.1.4   misho     647:   - SplFixedArray
                    648:     - SplFixedArray::__wakeup() (5.4.18)
                    649: 
1.1.1.2   misho     650: d. New global constants
                    651: 
                    652:   - CURLOPT_MAX_RECV_SPEED_LARGE
                    653:   - CURLOPT_MAX_SEND_SPEED_LARGE
                    654:   - ENT_DISALLOWED
                    655:   - ENT_HTML401
                    656:   - ENT_HTML5
                    657:   - ENT_SUBSTITUTE
                    658:   - ENT_XHTML
                    659:   - ENT_XML1
                    660:   - IPPROTO_IP
                    661:   - IPPROTO_IPV6
                    662:   - IPV6_MULTICAST_HOPS
                    663:   - IPV6_MULTICAST_IF
                    664:   - IPV6_MULTICAST_LOOP
                    665:   - IP_MULTICAST_IF
                    666:   - IP_MULTICAST_LOOP
                    667:   - IP_MULTICAST_TTL
                    668:   - JSON_BIGINT_AS_STRING
                    669:   - JSON_OBJECT_AS_ARRAY
                    670:   - JSON_PRETTY_PRINT
                    671:   - JSON_UNESCAPED_SLASHES
                    672:   - JSON_UNESCAPED_UNICODE
                    673:   - LIBXML_HTML_NODEFDTD
                    674:   - LIBXML_HTML_NOIMPLIED
                    675:   - LIBXML_PEDANTIC
                    676:   - MCAST_JOIN_GROUP
                    677:   - MCAST_LEAVE_GROUP
                    678:   - MCAST_BLOCK_SOURCE
                    679:   - MCAST_UNBLOCK_SOURCE
                    680:   - MCAST_JOIN_SOURCE_GROUP
                    681:   - MCAST_LEAVE_SOURCE_GROUP
                    682:   - OPENSSL_CIPHER_AES_128_CBC
                    683:   - OPENSSL_CIPHER_AES_192_CBC
                    684:   - OPENSSL_CIPHER_AES_256_CBC
                    685:   - OPENSSL_RAW_DATA
                    686:   - OPENSSL_ZERO_PADDING
                    687:   - PHP_OUTPUT_HANDLER_CLEAN
                    688:   - PHP_OUTPUT_HANDLER_CLEANABLE
                    689:   - PHP_OUTPUT_HANDLER_DISABLED
                    690:   - PHP_OUTPUT_HANDLER_FINAL
                    691:   - PHP_OUTPUT_HANDLER_FLUSH
                    692:   - PHP_OUTPUT_HANDLER_FLUSHABLE
                    693:   - PHP_OUTPUT_HANDLER_REMOVABLE
                    694:   - PHP_OUTPUT_HANDLER_STARTED
                    695:   - PHP_OUTPUT_HANDLER_STDFLAGS
                    696:   - PHP_OUTPUT_HANDLER_WRITE
                    697:   - PHP_QUERY_RFC1738
                    698:   - PHP_QUERY_RFC3986
                    699:   - PHP_SESSION_ACTIVE
                    700:   - PHP_SESSION_DISABLED
                    701:   - PHP_SESSION_NONE
                    702:   - SCANDIR_SORT_ASCENDING
                    703:   - SCANDIR_SORT_DESCENDING
                    704:   - SCANDIR_SORT_NONE
                    705:   - SORT_FLAG_CASE
                    706:   - SORT_NATURAL
                    707:   - STREAM_META_ACCESS
                    708:   - STREAM_META_GROUP
                    709:   - STREAM_META_GROUP_NAME
                    710:   - STREAM_META_OWNER
                    711:   - STREAM_META_OWNER_NAME
                    712:   - STREAM_META_TOUCH
                    713:   - T_CALLABLE
                    714:   - T_INSTEADOF
                    715:   - T_TRAIT
                    716:   - T_TRAIT_C
                    717:   - ZLIB_ENCODING_DEFLATE
                    718:   - ZLIB_ENCODING_GZIP
                    719:   - ZLIB_ENCODING_RAW
                    720:   - U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR
                    721:   - IDNA_CHECK_BIDI
                    722:   - IDNA_CHECK_CONTEXTJ
                    723:   - IDNA_NONTRANSITIONAL_TO_ASCII
                    724:   - IDNA_NONTRANSITIONAL_TO_UNICODE
                    725:   - INTL_IDNA_VARIANT_2003
                    726:   - INTL_IDNA_VARIANT_UTS46
                    727:   - IDNA_ERROR_EMPTY_LABEL
                    728:   - IDNA_ERROR_LABEL_TOO_LONG
                    729:   - IDNA_ERROR_DOMAIN_NAME_TOO_LONG
                    730:   - IDNA_ERROR_LEADING_HYPHEN
                    731:   - IDNA_ERROR_TRAILING_HYPHEN
                    732:   - IDNA_ERROR_HYPHEN_3_4
                    733:   - IDNA_ERROR_LEADING_COMBINING_MARK
                    734:   - IDNA_ERROR_DISALLOWED
                    735:   - IDNA_ERROR_PUNYCODE
                    736:   - IDNA_ERROR_LABEL_HAS_DOT
                    737:   - IDNA_ERROR_INVALID_ACE_LABEL
                    738:   - IDNA_ERROR_BIDI
                    739:   - IDNA_ERROR_CONTEXTJ
                    740: 
                    741: e. New classes
                    742: 
                    743:   - Reflection:
                    744:     - ReflectionZendExtension
                    745: 
                    746:   - Intl:
                    747:     - Transliterator
                    748:     - Spoofchecker
                    749: 
                    750:   - JSON:
                    751:     - JsonSerializable
                    752: 
                    753:   - Session:
                    754:     - SessionHandler
                    755: 
                    756:   - SNMP:
                    757:     - SNMP
                    758: 
                    759:   - SPL:
                    760:     - CallbackFilterIterator
                    761:     - RecursiveCallbackFilterIterator
                    762: 
                    763: f. New methods
                    764: 
                    765:   - Closure:
                    766:     - Closure::bind()
                    767:     - Closure::bindTo()
                    768: 
                    769:   - Reflection:
                    770:     - ReflectionClass::getTraitAliases()
                    771:     - ReflectionClass::getTraitNames()
                    772:     - ReflectionClass::getTraits()
                    773:     - ReflectionClass::isCloneable()
                    774:     - ReflectionClass::isTrait()
                    775:     - ReflectionClass::newInstanceWithoutConstructor()
                    776:     - ReflectionExtension::isPersistent()
                    777:     - ReflectionExtension::isTemporary()
                    778:     - ReflectionFunction::getClosure()
                    779:     - ReflectionFunction::getClosureScopeClass()
                    780:     - ReflectionFunction::getClosureThis()
                    781:     - ReflectionFunctionAbstract::getClosureScopeClass()
                    782:     - ReflectionFunctionAbstract::getClosureThis()
                    783:     - ReflectionMethod::getClosure()
                    784:     - ReflectionMethod::getClosureScopeClass()
                    785:     - ReflectionMethod::getClosureThis()
                    786:     - ReflectionObject::getTraitAliases()
                    787:     - ReflectionObject::getTraitNames()
                    788:     - ReflectionObject::getTraits()
                    789:     - ReflectionObject::isCloneable()
                    790:     - ReflectionObject::isTrait()
                    791:     - ReflectionObject::newInstanceWithoutConstructor()
                    792:     - ReflectionParameter::canBePassedByValue()
                    793:     - ReflectionParameter::isCallable()
                    794: 
                    795:   - PDO_DBLIB:
                    796:     - PDO::newRowset()
                    797: 
                    798:   - SPL:
                    799:     - DirectoryIterator::getExtension()
                    800:     - RegexIterator::getRegex()
                    801:     - SplDoublyLinkedList::serialize()
                    802:     - SplDoublyLinkedList::unserialize()
                    803:     - SplFileInfo::getExtension()
                    804:     - SplFileObject::fputcsv()
                    805:     - SplObjectStorage::getHash()
                    806:     - SplQueue::serialize
                    807:     - SplQueue::unserialize
                    808:     - SplStack::serialize
                    809:     - SplStack::unserialize
                    810:     - SplTempFileObject::fputcsv
                    811: 
                    812:   - XSLT:
                    813:     - XsltProcessor::setSecurityPrefs()
                    814:     - XsltProcessor::getSecurityPrefs()
                    815: 
                    816:   - Zlib:
                    817:     - zlib_decode()
                    818:     - zlib_encode()
                    819: 
                    820: g. New Hash algorithms
                    821: 
                    822:   - fnv132
                    823:   - fnv164
                    824:   - joaat

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>