summaryrefslogtreecommitdiff
path: root/Zend/tests/bug65051.phpt
blob: 42febf5b92e81f073c7f6549fdf2a67421627623 (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 #65051: count() off by one inside unset()
--FILE--
<?php

class Foo {
    public $array;

    public function __destruct() {
        var_dump(count($this->array[0]));
        var_dump($this->array[0]);
    }
}

$array = [[new Foo]];
$array[0][0]->array =& $array;
unset($array[0][0]);

?>
--EXPECT--
int(0)
array(0) {
}