dis-bench / src /php /php-src /Zend /tests /anon /013.phpt
meddyrat's picture
Replace repository contents with the original corrected artifact
1e94262
Raw History Blame Contribute Delete
242 Bytes
--TEST--
closure binding to anonymous class
--FILE--
<?php
$class = new class {};
$foo = function() {
return $this;
};
$closure = Closure::bind($foo, $class, $class);
var_dump($closure());
?>
--EXPECT--
object(class@anonymous)#1 (0) {
}