File tree Expand file tree Collapse file tree 3 files changed +43
-0
lines changed Expand file tree Collapse file tree 3 files changed +43
-0
lines changed Original file line number Diff line number Diff line change 209
209
required_num_args). (Julien)
210
210
211
211
- Standard:
212
+ . Fixed bug #69723 (Passing parameters by reference and array_column).
213
+ (Laruence)
212
214
. Fixed bug #69523 (Cookie name cannot be empty). (Christoph M. Becker)
213
215
. Fixed bug #69325 (php_copy_file_ex does not pass the argument).
214
216
(imbolk at gmail dot com)
Original file line number Diff line number Diff line change @@ -3061,6 +3061,7 @@ PHP_FUNCTION(array_column)
3061
3061
3062
3062
array_init (return_value );
3063
3063
ZEND_HASH_FOREACH_VAL (arr_hash , data ) {
3064
+ ZVAL_DEREF (data );
3064
3065
if (Z_TYPE_P (data ) != IS_ARRAY ) {
3065
3066
/* Skip elemens which are not sub-arrays */
3066
3067
continue ;
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Bug #69723 (Passing parameters by reference and array_column)
3
+ --FILE--
4
+ <?php
5
+ function byReference ( & $ array ){
6
+ foreach ($ array as &$ item ){
7
+ $ item ['nanana ' ] = 'batman ' ;
8
+ $ item ['superhero ' ] = 'robin ' ;
9
+ }
10
+ }
11
+
12
+ $ array = [
13
+ [
14
+ 'superhero ' => 'superman ' ,
15
+ 'nanana ' => 'no nana '
16
+ ],
17
+ [
18
+ 'superhero ' => 'acuaman ' ,
19
+ 'nanana ' => 'no nana '
20
+ ],
21
+
22
+ ];
23
+
24
+ var_dump (array_column ($ array , 'superhero ' ));
25
+ byReference ($ array );
26
+ var_dump (array_column ($ array , 'superhero ' ));
27
+ ?>
28
+ --EXPECT--
29
+ array(2) {
30
+ [0]=>
31
+ string(8) "superman"
32
+ [1]=>
33
+ string(7) "acuaman"
34
+ }
35
+ array(2) {
36
+ [0]=>
37
+ string(5) "robin"
38
+ [1]=>
39
+ string(5) "robin"
40
+ }
You can’t perform that action at this time.
0 commit comments