]> granicus.if.org Git - php/commitdiff
add BC breaks from PHPNG RFC
authorStanislav Malyshev <stas@php.net>
Mon, 15 Dec 2014 19:31:53 +0000 (11:31 -0800)
committerStanislav Malyshev <stas@php.net>
Mon, 15 Dec 2014 19:33:28 +0000 (11:33 -0800)
UPGRADING

index 544c8c0e484c9b7c57439fa02ff2b44517a357bd..d2be2afd5df44ef09ab16364308c8851e4770e9c 100644 (file)
--- a/UPGRADING
+++ b/UPGRADING
@@ -35,6 +35,13 @@ PHP X.Y UPGRADE NOTES
   . Removed ASP (<%) and script (<script language=php>) tags.
     (RFC: https://wiki.php.net/rfc/remove_alternative_php_tags)
   . call_user_method() and call_user_method_array() no longer exists.
+  . PHP 7 doesn't keep original values of arguments passed to user functions,
+    so func_get_arg() and func_get_args() will return current value of argument
+    instead of the actually passed. The following code is going to be affected:
+    function foo($x) { $x = 2; return func_get_arg(0);} var_dump(foo(1));
+    It will now produce 2, not 1.
+  . Function parameters with duplicate name are not allowed anymore. Definitions
+    like “function foo($x,$x) {}” will lead to compile time error.
 
 - DBA
   . dba_delete() now returns false if the key was not found for the inifile