1PHP NEWS 2||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 320 Jun 2011, PHP 5.4.0 Alpha 1 4- autoconf 2.59+ is now supported (and required) for generating the 5 configure script with ./buildconf. Autoconf 2.60+ is desirable 6 otherwise the configure help order may be incorrect. (Rasmus, Chris Jones) 7 8- Removed legacy features: 9 . break/continue $var syntax. (Dmitry) 10 . Safe mode and all related ini options. (Kalle) 11 . register_globals and register_long_arrays ini options. (Kalle) 12 . import_request_variables(). (Kalle) 13 . allow_call_time_pass_reference. (Pierrick) 14 . define_syslog_variables ini option and its associated function. (Kalle) 15 . highlight.bg ini option. (Kalle) 16 . Session bug compatibility mode (session.bug_compat42 and 17 session.bug_compat_warn ini options). (Kalle) 18 . session_is_registered(), session_register() and session_unregister() 19 functions. (Kalle) 20 . y2k_compliance ini option. (Kalle) 21 22- Moved extensions to PECL: (Johannes) 23 . ext/sqlite. 24 25- Changed $_SERVER['REQUEST_TIME'] to include microsecond precision. (Ilia) 26- Changed default value of "default_charset" php.ini option from ISO-8859-1 to 27 UTF-8. (Rasmus) 28- Changed array_combine() to return empty array instead of FALSE when both 29 parameter arrays are empty. FR #34857. (joel.perras@gmail.com) 30- Changed third parameter of preg_match_all() to optional. FR #53238. (Adam) 31- Changed silent casting of null/''/false into an Object when adding 32 a property into a warning. (Scott) 33- <?= is now always available regardless of the short_tags setting (Rasmus) 34 35- General improvements: 36 . Added multibyte support by default. Previously php had to be compiled 37 with --enable-zend-multibyte. Now it can be enabled or disabled through 38 zend.multibyte directive in php.ini. (Dmitry) 39 . Removed compile time dependency from ext/mbstring (Dmitry) 40 . Added support for Traits. (Stefan) 41 . Added closure $this support back. (Stas) 42 . Added array dereferencing support. (Felipe) 43 . Added indirect method call through array. FR #47160. (Felipe) 44 . Added support for object references in recursive serialize() calls. 45 FR #36424. (Mike) 46 . Added http_response_code() function. FR #52555. (Paul Dragoonis, Kalle) 47 . Added header_register_callback() which is invoked immediately 48 prior to the sending of headers and after default headers have 49 been added. (Scott) 50 . Added DTrace support. (David Soria Parra) 51 . Improved output layer, see README.NEW-OUTPUT-API for internals. (Mike) 52 . Improved unserialize() performance. 53 (galaxy dot mipt at gmail dot com, Kalle) 54 . Improved unix build system to allow building multiple PHP binary SAPIs and 55 one SAPI module the same time. FR #53271, FR #52410. (Jani) 56 . Added optional argument to debug_backtrace() and debug_print_backtrace() 57 to limit the amount of stack frames returned. (Sebastian, Patrick) 58 . Added stream metadata API support and stream_metadata() stream class 59 handler. (Stas) 60 61- Improved Zend Engine memory usage: (Dmitry) 62 . Replaced zend_function.pass_rest_by_reference by 63 ZEND_ACC_PASS_REST_BY_REFERENCE in zend_function.fn_flags. 64 . Replaced zend_function.return_reference by ZEND_ACC_RETURN_REFERENCE 65 in zend_function.fn_flags. 66 . Removed zend_arg_info.required_num_args as it was only needed for internal 67 functions. Now the first arg_info for internal functions (which has special 68 meaning) is represented by zend_internal_function_info structure. 69 . Moved zend_op_array.size, size_var, size_literal, current_brk_cont, 70 backpatch_count into CG(context) as they are used only during compilation. 71 . Moved zend_op_array.start_op into EG(start_op) as it's used only for 72 'interactive' execution of single top-level op-array. 73 . Replaced zend_op_array.done_pass_two by ZEND_ACC_DONE_PASS_TWO in 74 zend_op_array.fn_flags. 75 . op_array.vars array is trimmed (reallocated) during pass_two. 76 . Replaced zend_class_entry.constants_updated by ZEND_ACC_CONSTANTS_UPDATED 77 in zend_class_entry.ce_flags. 78 . Reduced the size of zend_class_entry by sharing the same memory space 79 by different information for internal and user classes. 80 See zend_class_entry.info union. 81 . Reduced size of temp_variable. 82 83- Changed the structure of op_array.opcodes. The constant values are moved from 84 opcode operands into a separate literal table. (Dmitry) 85 86- Improved Zend Engine, performance tweaks and optimizations: (Dmitry) 87 . Inlined most probable code-paths for arithmetic operations directly into 88 executor. 89 . Eliminated unnecessary iterations during request startup/shutdown. 90 . Changed $GLOBALS into a JIT autoglobal, so it's initialized only if used. 91 (this may affect opcode caches!) 92 . Improved performance of @ (silence) operator. 93 . Simplified string offset reading. $str[1][0] is now a legal construct. 94 . Added caches to eliminate repeatable run-time bindings of functions, 95 classes, constants, methods and properties. 96 . Added concept of interned strings. All strings constants known at compile 97 time are allocated in a single copy and never changed. 98 . Added an optimization which saves memory and emalloc/efree calls for empty 99 HashTables. (Stas, Dmitry) 100 . ZEND_RECV now always has IS_CV as its result. 101 . ZEND_CATCH now has to be used only with constant class names. 102 . ZEND_FETCH_DIM_? may fetch array and dimension operands in different order. 103 . Simplified ZEND_FETCH_*_R operations. They can't be used with the 104 EXT_TYPE_UNUSED flag any more. This is a very rare and useless case. 105 ZEND_FREE might be required after them instead. 106 . Split ZEND_RETURN into two new instructions ZEND_RETURN and 107 ZEND_RETURN_BY_REF. 108 . Optimized access to global constants using values with pre-calculated 109 hash_values from the literals table. 110 . Optimized access to static properties using executor specialization. 111 A constant class name may be used as a direct operand of ZEND_FETCH_* 112 instruction without previous ZEND_FETCH_CLASS. 113 . zend_stack and zend_ptr_stack allocation is delayed until actual usage. 114 115- Improved CLI SAPI: (Johannes) 116 . Added command line option --rz <name> which shows information of the 117 named Zend extension. 118 . Interactive readline shell improvements: 119 . Added "cli.pager" php.ini setting to set a pager for output. 120 . Added "cli.prompt" php.ini setting to configure the shell prompt. 121 . Added shortcut #inisetting=value to change ini settings at run-time. 122 . Changed shell not to terminate on fatal errors. 123 . Interactive shell works with shared readline extension. FR #53878. 124 125- Improved FastCGI SAPI: (Dmitry) 126 . Added apache compatible functions: apache_child_terminate(), 127 getallheaders(), apache_request_headers() and apache_response_headers() 128 . Improved performance of FastCGI request parsing. 129 130- Improved core functions: 131 . number_format() no longer truncates multibyte decimal points and thousand 132 separators to the first byte. FR #53457. (Adam) 133 . Added hex2bin() function. (Scott) 134 135- Improved CURL extension: 136 . Added support for CURLOPT_MAX_RECV_SPEED_LARGE and 137 CURLOPT_MAX_SEND_SPEED_LARGE. FR #51815. (Pierrick) 138 139- Improved Date extension: 140 . Added the + modifier to parseFromFormat to allow trailing text in the 141 string to parse without throwing an error. (Stas, Derick) 142 143- Improved DBA extension: 144 . Added Tokyo Cabinet abstract DB support. (Michael Maclean) 145 . Added Berkeley DB 5 support. (Johannes, Chris Jones) 146 147- Improved filesystem functions: 148 . scandir() now accepts SCANDIR_SORT_NONE as a possible sorting_order value. 149 FR #53407. (Adam) 150 151- Improved HASH extension: 152 . Added Jenkins's one-at-a-time hash support. (Martin Jansen) 153 . Added FNV-1 hash support. (Michael Maclean) 154 . Made Adler32 algorithm faster. FR #53213. (zavasek at yandex dot ru) 155 156- Improved intl extension: 157 . Added Spoofchecker, allows checking for visibly confusable characters and 158 other security issues. (Scott) 159 160- Improved JSON extension: 161 . Added JsonSerializable interface. (Sara) 162 . Added JSON_BIGINT_AS_STRING, extended json_decode() sig with $options. 163 (Sara) 164 . Added support for JSON_NUMERIC_CHECK option in json_encode() that converts 165 numeric strings to integers. (Ilia) 166 . Added new json_encode() option JSON_PRETTY_PRINT. FR #44331. (Adam) 167 . Added new json_encode() option JSON_UNESCAPED_SLASHES. FR #49366. (Adam) 168 169- Improved LDAP extension: 170 . Added paged results support. FR #42060. (ando@OpenLDAP.org, 171 iarenuno@eteo.mondragon.edu, jeanseb@au-fil-du.net, remy.saissy@gmail.com) 172 173- Improved MySQL extensions: 174 . MySQL: Deprecated mysql_list_dbs(). FR #50667. (Andrey) 175 . mysqlnd: Added named pipes support. FR #48082. (Andrey) 176 . MySQLi: Added iterator support in MySQLi. mysqli_result implements 177 Traversable. (Andrey, Johannes) 178 . PDO_mysql: Removed support for linking with MySQL client libraries older 179 than 4.1. (Johannes) 180 181- Improved OpenSSL extension: 182 . Added AES support. FR #48632. (yonas dot y at gmail dot com, Pierre) 183 . Added a "no_ticket" SSL context option to disable the SessionTicket TLS 184 extension. FR #53447. (Adam) 185 . Added no padding option to openssl_encrypt()/openssl_decrypt(). (Scott) 186 187- Improved PDO DB-LIB: (Stanley) 188 . Added nextRowset support. 189 . Fixed bug #50755 (PDO DBLIB Fails with OOM). 190 191- Improved PostgreSQL extension: 192 . Added support for "extra" parameter for PGNotify(). 193 (r dot i dot k at free dot fr, Ilia) 194 195- Improved Reflection extension: (Johannes) 196 . Added ReflectionExtension::isTemporary() and 197 ReflectionExtension::isPersistent() methods. 198 . Added ReflectionZendExtension class. 199 . Added ReflectionClass::isCloneable(). (Felipe) 200 201- Improved Session extension: 202 . Added support for storing upload progress feedback in session data. (Arnaud) 203 . Changed session.entropy_file to default to /dev/urandom or /dev/arandom if 204 either is present at compile time. (Rasmus) 205 206- Improved SPL extension: 207 . Added RegexIterator::getRegex() method. (Joshua Thijssen) 208 . Added SplObjectStorage::getHash() hook. (Etienne) 209 . Added CallbackFilterIterator and RecursiveCallbackFilterIterator. (Arnaud) 210 211- Improved ZLIB extension: 212 . Re-implemented non-file related functionality. (Mike) 213 214- Improved SNMP extension (Boris Lytochkin): 215 . Added OO API. FR #53594 (php-snmp rewrite). 216 . Sanitized return values of existing functions. Now it returns FALSE on 217 failure. 218 . Allow ~infinite OIDs in GET/GETNEXT/SET queries. Autochunk them to max_oids 219 upon request. 220 . Introducing unit tests for extension with ~full coverage. 221 . Fixed bugs 222 . #44193 (snmp v3 noAuthNoPriv doesn't work) 223 . #45893 (Snmp buffer limited to 2048 char) 224 . #46065 (snmp_set_quick_print() persists between requests) 225 . #51336 (snmprealwalk (snmp v1) does not handle end of OID tree correctly) 226 . #53862 (snmp_set_oid_output_format does not allow returning to default) 227 228## UNSORTED ## 229 230- Fixed PDO objects binary incompatibility. (Dmitry) 231- Fixed bug #52211 (iconv() returns part of string on error). (Felipe) 232