xref: /PHP-7.4/Zend/tests/anon/013.phpt (revision ded3d984)
1--TEST--
2closure binding to anonymous class
3--FILE--
4<?php
5$class = new class {};
6$foo = function() {
7    return $this;
8};
9
10$closure = Closure::bind($foo, $class, $class);
11var_dump($closure());
12?>
13--EXPECT--
14object(class@anonymous)#1 (0) {
15}
16