php-src/Zend/tests/bug62907.phpt
2018-10-14 19:45:12 +02:00

23 lines
507 B
PHP

--TEST--
Bug #62907 (Double free when use traits)
--FILE--
<?php
spl_autoload_register(function ($name) {
if ($name == "B") {
eval ("abstract class B extends A { }");
} else if ($name == "A") {
eval ("abstract class A { use T { T::__construct as __asconstruct; }}");
} else if ($name == "T") {
eval ("trait T { public function __construct() { } }");
}
return TRUE;
});
class C extends B {
public function __construct() {
}
}
echo "okey";
--EXPECT--
okey