dis-bench / src /php /php-src /Zend /tests /anon /009.phpt
meddyrat's picture
Replace repository contents with the original corrected artifact
1e94262
Raw History Blame Contribute Delete
240 Bytes
--TEST--
testing traits in anon classes
--FILE--
<?php
trait Foo {
public function someMethod() {
return "bar";
}
}
$anonClass = new class {
use Foo;
};
var_dump($anonClass->someMethod());
?>
--EXPECT--
string(3) "bar"