xref: /PHP-7.0/ext/standard/tests/array/bug71660.phpt (revision c299b272)
1--TEST--
2Bug #71660 (array_column behaves incorrectly after foreach by reference)
3--FILE--
4<?php
5$arr = array('id' => 12345, 'name' => 'sam');
6foreach ($arr as &$v) {
7	    $v = $v;
8}
9
10$arr = [$arr];
11
12var_dump(array_column($arr, 'name', 'id'));
13?>
14--EXPECT--
15array(1) {
16  [12345]=>
17  string(3) "sam"
18}
19