File tree Expand file tree Collapse file tree 5 files changed +51
-9
lines changed Expand file tree Collapse file tree 5 files changed +51
-9
lines changed Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Array must be separated if unpacking by reference
3
+ --FILE--
4
+ <?php
5
+
6
+ function inc (&... $ args ) {
7
+ foreach ($ args as &$ arg ) {
8
+ $ arg ++;
9
+ }
10
+ }
11
+
12
+ $ arr = [1 , 2 ];
13
+ $ arr [] = 3 ;
14
+ $ arr2 = $ arr ;
15
+ inc (...$ arr );
16
+ var_dump ($ arr );
17
+ var_dump ($ arr2 );
18
+
19
+ ?>
20
+ --EXPECT--
21
+ array(3) {
22
+ [0]=>
23
+ int(2)
24
+ [1]=>
25
+ int(3)
26
+ [2]=>
27
+ int(4)
28
+ }
29
+ array(3) {
30
+ [0]=>
31
+ int(1)
32
+ [1]=>
33
+ int(2)
34
+ [2]=>
35
+ int(3)
36
+ }
Original file line number Diff line number Diff line change @@ -4422,7 +4422,7 @@ ZEND_VM_C_LABEL(send_again):
4422
4422
4423
4423
zend_vm_stack_extend_call_frame (& EX (call ), arg_num - 1 , zend_hash_num_elements (ht ));
4424
4424
4425
- if (OP1_TYPE != IS_CONST && OP1_TYPE != IS_TMP_VAR && Z_IMMUTABLE_P (args )) {
4425
+ if (OP1_TYPE != IS_CONST && OP1_TYPE != IS_TMP_VAR && Z_REFCOUNT_P (args ) > 1 ) {
4426
4426
uint32_t i ;
4427
4427
int separate = 0 ;
4428
4428
@@ -4434,7 +4434,7 @@ ZEND_VM_C_LABEL(send_again):
4434
4434
}
4435
4435
}
4436
4436
if (separate ) {
4437
- zval_copy_ctor (args );
4437
+ SEPARATE_ARRAY (args );
4438
4438
ht = Z_ARRVAL_P (args );
4439
4439
}
4440
4440
}
@@ -4448,7 +4448,7 @@ ZEND_VM_C_LABEL(send_again):
4448
4448
4449
4449
top = ZEND_CALL_ARG (EX (call ), arg_num );
4450
4450
if (ARG_SHOULD_BE_SENT_BY_REF (EX (call )-> func , arg_num )) {
4451
- if (! Z_IMMUTABLE_P (args )) {
4451
+ if (Z_REFCOUNT_P (args ) == 1 ) {
4452
4452
ZVAL_MAKE_REF (arg );
4453
4453
Z_ADDREF_P (arg );
4454
4454
ZVAL_REF (top , Z_REF_P (arg ));
Original file line number Diff line number Diff line change @@ -954,7 +954,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_UNPACK_SPEC_HANDLER(ZEND_
954
954
955
955
zend_vm_stack_extend_call_frame(&EX(call), arg_num - 1, zend_hash_num_elements(ht));
956
956
957
- if (opline->op1_type != IS_CONST && opline->op1_type != IS_TMP_VAR && Z_IMMUTABLE_P (args)) {
957
+ if (opline->op1_type != IS_CONST && opline->op1_type != IS_TMP_VAR && Z_REFCOUNT_P (args) > 1 ) {
958
958
uint32_t i;
959
959
int separate = 0;
960
960
@@ -966,7 +966,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_UNPACK_SPEC_HANDLER(ZEND_
966
966
}
967
967
}
968
968
if (separate) {
969
- zval_copy_ctor (args);
969
+ SEPARATE_ARRAY (args);
970
970
ht = Z_ARRVAL_P(args);
971
971
}
972
972
}
@@ -980,7 +980,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_UNPACK_SPEC_HANDLER(ZEND_
980
980
981
981
top = ZEND_CALL_ARG(EX(call), arg_num);
982
982
if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
983
- if (!Z_IMMUTABLE_P (args)) {
983
+ if (Z_REFCOUNT_P (args) == 1 ) {
984
984
ZVAL_MAKE_REF(arg);
985
985
Z_ADDREF_P(arg);
986
986
ZVAL_REF(top, Z_REF_P(arg));
Original file line number Diff line number Diff line change @@ -57,11 +57,11 @@ function get_attr($conn)
57
57
?>
58
58
--EXPECT--
59
59
**Test 1.1 - Default values for the attribute **************
60
- The value of DRIVER_NAME is PHP OCI8 : 2.1.0
60
+ The value of DRIVER_NAME is PHP OCI8 : 2.1.1
61
61
62
62
***Test 1.2 - Get the values from different connections **************
63
63
Testing with oci_pconnect()
64
- The value of DRIVER_NAME is PHP OCI8 : 2.1.0
64
+ The value of DRIVER_NAME is PHP OCI8 : 2.1.1
65
65
Testing with oci_new_connect()
66
- The value of DRIVER_NAME is PHP OCI8 : 2.1.0
66
+ The value of DRIVER_NAME is PHP OCI8 : 2.1.1
67
67
Done
Original file line number Diff line number Diff line change 2
2
FPM: Test status page
3
3
--SKIPIF--
4
4
<?php include "skipif.inc " ; ?>
5
+ --XFAIL--
6
+ randomly intermittently failing all the time in CI, with diff:
7
+ 017+ active processes: 0
8
+ 018+ total processes: 1
9
+ 017- active processes: 1
10
+ 018- total processes: 2
5
11
--FILE--
6
12
<?php
7
13
You can’t perform that action at this time.
0 commit comments