mirror of
https://github.com/php/php-src.git
synced 2026-04-22 15:38:49 +02:00
ded3d984c6
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
16 lines
242 B
PHP
16 lines
242 B
PHP
--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) {
|
|
}
|