com php-langspec: Adjust for PHP 8 negative array key change: spec/10-expressions.md tests/expressions/postfix_operators/su bscripting_2.phpt

[email protected] (Nikita Popov) Mon, 08 Apr 2019 07:21:58 +0000
Newsgroups php.standards.cvs
Message-ID <[email protected]>
Commit:    51566692791bfab5250488f319831925ca0c1c3b=0AAuthor:    Nikita Pop=
ov <[email protected]>         Mon, 8 Apr 2019 09:21:58 +0200=0AParents:=
   2f0881e79809cb0e910b38208f60a46106a60cf3=0ABranches:  master=0A=0ALink: =
      http://git.php.net/?p=3Dphp-langspec.git;a=3Dcommitdiff;h=3D515666927=
91bfab5250488f319831925ca0c1c3b=0A=0ALog:=0AAdjust for PHP 8 negative array=
 key change=0A=0AChanged paths:=0A  M  spec/10-expressions.md=0A  M  tests/=
expressions/postfix_operators/subscripting_2.phpt=0A=0A=0ADiff:=0Adiff --gi=
t a/spec/10-expressions.md b/spec/10-expressions.md=0Aindex 93c8112..a32896=
0 100644=0A--- a/spec/10-expressions.md=0A+++ b/spec/10-expressions.md=0A@@=
 -888,9 +888,8 @@ and value of the result is the type and value of that ele=
ment;=0A otherwise, the result is `NULL`.=0A =0A If *expression* is omitted=
, a new element is inserted. Its key has type=0A-`int` and is one more than=
 the highest, previously assigned, non-negative=0A-`int` key for this array=
. If this is the first element with a non-negative=0A-`int` key, key `0` is=
 used.=0A+`int` and is one more than the highest, previously assigned `int`=
 key for=0A+this array. If this is the first element with an `int` key, key=
 `0` is used.=0A If the largest previously assigned `int` key is the larges=
t integer value that can be represented,=0A the new element is not added.=
=0A The result is the added new element, or `NULL` if the element was not a=
dded.=0Adiff --git a/tests/expressions/postfix_operators/subscripting_2.php=
t b/tests/expressions/postfix_operators/subscripting_2.phpt=0Aindex c9c2b49=
..a269350 100644=0A--- a/tests/expressions/postfix_operators/subscripting_2=
.phpt=0A+++ b/tests/expressions/postfix_operators/subscripting_2.phpt=0A@@ =
-11,7 +11,7 @@ var_dump($a);=0A echo "------\n";=0A =0A $a =3D array(-30 =
=3D> 33, -10 =3D> -11);=0A-var_dump($a[] =3D 991);=09=09// creates $a[0]=0A=
+var_dump($a[] =3D 991);=09=09// creates $a[-9]=0A var_dump($a);=0A echo "-=
-----\n";=0A =0A@@ -170,7 +170,7 @@ array(3) {=0A   int(33)=0A   [-10]=3D>=
=0A   int(-11)=0A-  [0]=3D>=0A+  [-9]=3D>=0A   int(991)=0A }=0A ------=0A