Skip to content

Commit e24194d

Browse files
committed
Add test for #62907
1 parent 383eafe commit e24194d

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

Zend/tests/bug62907.phpt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
--TEST--
2+
Bug #62907 (Double free when use traits)
3+
--XFAIL--
4+
bug is not fixed yet
5+
--FILE--
6+
<?php
7+
function __autoload($name) {
8+
if ($name == "B") {
9+
eval ("abstract class B extends A { }");
10+
} else if ($name == "A") {
11+
eval ("abstract class A { use T { T::__construct as __asconstruct; }}");
12+
} else if ($name == "T") {
13+
eval ("trait T { public function __construct() { } }");
14+
}
15+
return TRUE;
16+
}
17+
18+
class C extends B {
19+
public function __construct() {
20+
}
21+
}
22+
echo "okey";
23+
--EXPECT--
24+
okey

0 commit comments

Comments
 (0)