summaryrefslogtreecommitdiff
path: root/Zend/tests/bug71529.phpt
blob: 5a5e323414566d3e1424b54dbc00fddd69f73ef4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--TEST--
Bug #71529: Variable references on array elements don't work when using count
--FILE--
<?php

$a = [1];
$a[] = &$a[out(count($a) - 1)];
var_dump($a);

function out($what) {
    var_dump($what);
    return $what;
}

?>
--EXPECT--
int(0)
array(2) {
  [0]=>
  &int(1)
  [1]=>
  &int(1)
}