diff options
Diffstat (limited to 'Zend/tests/anon/013.phpt')
| -rw-r--r-- | Zend/tests/anon/013.phpt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Zend/tests/anon/013.phpt b/Zend/tests/anon/013.phpt new file mode 100644 index 0000000000..72ba3d61b7 --- /dev/null +++ b/Zend/tests/anon/013.phpt @@ -0,0 +1,15 @@ +--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) { +} |
