File tree 2 files changed +4
-5
lines changed
tests/expressions/postfix_operators
2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -888,9 +888,8 @@ and value of the result is the type and value of that element;
888
888
otherwise, the result is ` NULL ` .
889
889
890
890
If * expression* is omitted, a new element is inserted. Its key has type
891
- ` int ` and is one more than the highest, previously assigned, non-negative
892
- ` int ` key for this array. If this is the first element with a non-negative
893
- ` int ` key, key ` 0 ` is used.
891
+ ` int ` and is one more than the highest, previously assigned ` int ` key for
892
+ this array. If this is the first element with an ` int ` key, key ` 0 ` is used.
894
893
If the largest previously assigned ` int ` key is the largest integer value that can be represented,
895
894
the new element is not added.
896
895
The result is the added new element, or ` NULL ` if the element was not added.
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ var_dump($a);
11
11
echo "------ \n" ;
12
12
13
13
$ a = array (-30 => 33 , -10 => -11 );
14
- var_dump ($ a [] = 991 ); // creates $a[0 ]
14
+ var_dump ($ a [] = 991 ); // creates $a[-9 ]
15
15
var_dump ($ a );
16
16
echo "------ \n" ;
17
17
@@ -170,7 +170,7 @@ array(3) {
170
170
int(33 )
171
171
[-10 ]=>
172
172
int(-11 )
173
- [0 ]=>
173
+ [- 9 ]=>
174
174
int(991 )
175
175
}
176
176
------
You can’t perform that action at this time.
0 commit comments