php-src/Zend/tests/bug62907.phpt

23 lines
507 B
Plaintext
Raw Normal View History

2012-08-26 18:28:15 +08:00
--TEST--
Bug #62907 (Double free when use traits)
--FILE--
<?php
2017-01-31 05:28:17 +08:00
spl_autoload_register(function ($name) {
2012-08-26 18:28:15 +08:00
if ($name == "B") {
eval ("abstract class B extends A { }");
} else if ($name == "A") {
2018-09-17 01:16:42 +08:00
eval ("abstract class A { use T { T::__construct as __asconstruct; }}");
2012-08-26 18:28:15 +08:00
} else if ($name == "T") {
2018-09-17 01:16:42 +08:00
eval ("trait T { public function __construct() { } }");
}
2012-08-26 18:28:15 +08:00
return TRUE;
2017-01-31 05:28:17 +08:00
});
2012-08-26 18:28:15 +08:00
class C extends B {
public function __construct() {
}
}
echo "okey";
--EXPECT--
okey