blob: e48e9b7ca4c4ec4e81965edf7014c2b0e1109b84 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
--TEST--
Bug #78379 (Cast to object confuses GC, causes crash)
--INI--
opcache.enable=0
--FILE--
<?php
class C {
public function __construct() {
$this->p = (object)["x" => [1]];
}
}
class E {
}
$e = new E;
$e->f = new E;
$e->f->e = $e;
$e->a = new C;
$e = null;
gc_collect_cycles();
var_dump(new C);
?>
--EXPECTF--
object(C)#%d (1) {
["p"]=>
object(stdClass)#%d (1) {
["x"]=>
array(1) {
[0]=>
int(1)
}
}
}
|