dis-bench / src /php /php-src /Zend /tests /anon /011.phpt
meddyrat's picture
Replace repository contents with the original corrected artifact
1e94262
Raw History Blame Contribute Delete
333 Bytes
--TEST--
Ensure proper inheritance with get_class(anon class instance) used via class_alias (see also bug #70106)
--FILE--
<?php
class_alias(get_class(new class { protected $foo = 1; }), "AnonBase");
var_dump((new class extends AnonBase {
function getFoo() {
return $this->foo;
}
})->getFoo());
?>
--EXPECT--
int(1)