dis-bench / src /php /php-src /Zend /tests /anon /007.phpt
meddyrat's picture
Replace repository contents with the original corrected artifact
1e94262
Raw History Blame Contribute Delete
362 Bytes
--TEST--
testing anon classes in functions outside of classes in namespaces
--FILE--
<?php
namespace lone {
function my_factory() {
return new class{};
}
class Outer {
public function __construct() {
var_dump(
my_factory());
}
}
new Outer();
}
?>
--EXPECTF--
object(class@%s)#2 (0) {
}