xref: /PHP-8.0/Zend/tests/bug33282.phpt (revision f8d79582)
1--TEST--
2Bug #33282 (Re-assignment by reference does not clear the is_ref flag)
3--FILE--
4<?php
5    $a = array(1, 2, 3);
6    $r = &$a[0];
7    $r = &$a[1];
8    $r = &$a[2];
9    var_dump($a);
10?>
11--EXPECT--
12array(3) {
13  [0]=>
14  int(1)
15  [1]=>
16  int(2)
17  [2]=>
18  &int(3)
19}
20