mirror of
https://github.com/php/php-src.git
synced 2025-08-19 08:49:28 +02:00
15 lines
243 B
PHP
15 lines
243 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());
|
|
?>
|
|
--EXPECTF--
|
|
object(class@anonymous)#1 (0) {
|
|
}
|