You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

208 lines
8.0 KiB

12 years ago
12 years ago
11 years ago
17 years ago
12 years ago
  1. $Id$
  2. PHP X.Y UPGRADE NOTES
  3. 1. Backward Incompatible Changes
  4. 2. New Features
  5. 3. Changes in SAPI modules
  6. 4. Deprecated Functionality
  7. 5. Changed Functions
  8. 6. New Functions
  9. 7. New Classes and Interfaces
  10. 8. Removed Extensions
  11. 9. Other Changes to Extensions
  12. 10. New Global Constants
  13. 11. Changes to INI File Handling
  14. 12. Windows Support
  15. 13. Other Changes
  16. ========================================
  17. 1. Backward Incompatible Changes
  18. ========================================
  19. - Core
  20. . list() now always supports ArrayAccess and never supports strings.
  21. Previously both were accepted in some situations and not in others.
  22. (RFC: https://wiki.php.net/rfc/fix_list_behavior_inconsistency)
  23. . Bitwise shifts by negative numbers of bits are disallowed (throws E_WARNING
  24. and gives FALSE, like a division by zero).
  25. . Left bitwise shifts by a number of bits beyond the bit width of an integer
  26. will always result in 0, even on CPUs which wrap around.
  27. . Right bitwise shifts by a number of bits beyond the bit width of an integer
  28. will always result in 0 or -1 (depending on sign), even on CPUs which wrap
  29. around.
  30. . Removed ASP (<%) and script (<script language=php>) tags.
  31. (RFC: https://wiki.php.net/rfc/remove_alternative_php_tags)
  32. . call_user_method() and call_user_method_array() no longer exists.
  33. . PHP 7 doesn't keep original values of arguments passed to user functions,
  34. so func_get_arg() and func_get_args() will return current value of argument
  35. instead of the actually passed. The following code is going to be affected:
  36. function foo($x) { $x = 2; return func_get_arg(0);} var_dump(foo(1));
  37. It will now produce 2, not 1.
  38. . Function parameters with duplicate name are not allowed anymore. Definitions
  39. like “function foo($x,$x) {}” will lead to compile time error.
  40. . Indirect variable, property and method references are now interpreted with
  41. left-to-right semantics. See details in:
  42. https://wiki.php.net/rfc/uniform_variable_syntax#semantic_differences_in_existing_syntax
  43. . The global keyword now only accepts simple variables. See details in:
  44. https://wiki.php.net/rfc/uniform_variable_syntax#global_keyword_takes_only_simple_variables
  45. . The addition of Unicode Codepoint Escape Syntax for double-quoted strings
  46. and heredocs means that \u{ followed by an invalid sequence will now error.
  47. However, \u without a following { is unaffected, so "\u202e" won't error and
  48. will work the same as before.
  49. . zend_function.common.num_args don't include the variadic argument anymore.
  50. . ob_start() no longer issues an E_ERROR, but instead an E_RECOVERABLE_ERROR in case an
  51. output buffer is created in an output buffer handler.
  52. . Removed support for assigning the result of new by reference.
  53. . Removed support for scoped calls to non-static methods from an incompatible
  54. $this context. See details in https://wiki.php.net/rfc/incompat_ctx.
  55. . Removed support for #-style comments in ini files. Use ;-style comments
  56. instead.
  57. . Added zend_memnstr_ex, which is based on string matching sunday algo.
  58. . Added zend_memnrstr, zend_memnrstr_ex.
  59. . Added hybrid sorting algo zend_sort for better performance.
  60. . Added stable sorting algo zend_insert_sort.
  61. . Invalid octal literals in source code now produce compile errors, fixing
  62. PHPSadness #31. Previously, the invalid digits (and any following valid
  63. digits) were simply ignored, such that 0781 became 7.
  64. . Removed dl() function on fpm-fcgi.
  65. . Removed support for hexadecimal numeric strings. This means that some
  66. operations like == will no longer specially interpret strings containing
  67. hexadecimal numbers. Furthermore is_numeric() will not consider hexadecimal
  68. strings to be numeric (use FILTER_VALIDATE_INT instead).
  69. (RFC: https://wiki.php.net/rfc/remove_hex_support_in_numeric_strings)
  70. - Date:
  71. . Removed $is_dst parameter from mktime() and gmmktime().
  72. - DBA
  73. . dba_delete() now returns false if the key was not found for the inifile
  74. handler, too.
  75. - GMP
  76. . Requires libgmp version 4.2 or newer now.
  77. . gmp_setbit() and gmp_clrbit() now return FALSE for negative indices, making
  78. them consistent with other GMP functions.
  79. - Session
  80. . session_start() accepts all INI settings as array. e.g. ['cache_limiter'=>'private']
  81. sets session.cache_limiter=private. It also supports 'read_and_close' which closes
  82. session data immediately after read data.
  83. . Save handler accepts validate_sid(), update_timestamp() which validates session
  84. ID existence, updates timestamp of session data. Compatibility of old user defined
  85. save handler is retained.
  86. . SessionUpdateTimestampHandlerInterface is added. validateSid(), updateTimestamp()
  87. is defined in the interface.
  88. . session.lazy_write(default=On) INI setting enables only write session data when
  89. session data is updated.
  90. - PCRE:
  91. . Removed support for /e (PREG_REPLACE_EVAL) modifier. Use
  92. preg_reaplace_callback() instead.
  93. - Standard:
  94. . Removed string category support in setlocale(). Use the LC_* constants
  95. instead.
  96. . Removed set_magic_quotes_runtime() and its alias magic_quotes_runtime().
  97. - Stream:
  98. . Removed set_socket_blocking() in favor of its alias stream_set_blocking().
  99. ========================================
  100. 2. New Features
  101. ========================================
  102. - Core
  103. . Added null coalesce operator (??).
  104. (RFC: https://wiki.php.net/rfc/isset_ternary)
  105. . Support for strings with length >= 2^31 bytes in 64 bit builds.
  106. . Closure::call() method added.
  107. . Added \u{xxxxxx} Unicode Codepoint Escape Syntax for double-quoted strings
  108. and heredocs.
  109. . define() now supports arrays as constant values, fixing an oversight where define() did not support arrays yet const syntax did.
  110. ========================================
  111. 3. Changes in SAPI modules
  112. ========================================
  113. - FPM
  114. . Fixed bug #65933 (Cannot specify config lines longer than 1024 bytes).
  115. . Listen = port now listen on all addresses (IPv6 and IPv4-mapped).
  116. ========================================
  117. 4. Deprecated Functionality
  118. ========================================
  119. ========================================
  120. 5. Changed Functions
  121. ========================================
  122. - parse_ini_file():
  123. - parse_ini_string():
  124. . Added scanner mode INI_SCANNER_TYPED to yield typed .ini values.
  125. - unserialize():
  126. . Added second parameter for unserialize function
  127. (RFC: https://wiki.php.net/rfc/secure_unserialize) allowing to specify
  128. acceptable classes:
  129. unserialize($foo, ["allowed_classes" => ["MyClass", "MyClass2"]);
  130. ========================================
  131. 6. New Functions
  132. ========================================
  133. - GMP
  134. . Added gmp_random_seed().
  135. - Standard
  136. . Added intdiv() function for integer division.
  137. ========================================
  138. 7. New Classes and Interfaces
  139. ========================================
  140. ========================================
  141. 8. Removed Extensions
  142. ========================================
  143. ========================================
  144. 9. Other Changes to Extensions
  145. ========================================
  146. ========================================
  147. 10. New Global Constants
  148. ========================================
  149. - Core
  150. . PHP_INT_MIN added.
  151. ========================================
  152. 11. Changes to INI File Handling
  153. ========================================
  154. - Core
  155. . Removed asp_tags ini directive. Trying to enable it will result in a fatal
  156. error.
  157. ========================================
  158. 12. Windows Support
  159. ========================================
  160. - Core
  161. . Support for native 64 bit integers in 64 bit builds.
  162. . Support for large files in 64 bit builds.
  163. ========================================
  164. 13. Other Changes
  165. ========================================
  166. - Core
  167. . Instead of being undefined and platform-dependent, NaN and Infinity will
  168. always be zero when casted to integer.
  169. . Calling a method on a non-object no longer raises a fatal error; see
  170. also: https://wiki.php.net/rfc/catchable-call-to-member-of-non-object.
  171. . Error messages for zend_parse_parameters, type hints and conversions now always say "integer" and "float" instead of "long" and "double".