diff options
Diffstat (limited to 'Zend/tests/closure_030.phpt')
-rw-r--r-- | Zend/tests/closure_030.phpt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Zend/tests/closure_030.phpt b/Zend/tests/closure_030.phpt new file mode 100644 index 0000000..318d215 --- /dev/null +++ b/Zend/tests/closure_030.phpt @@ -0,0 +1,20 @@ +--TEST-- +Closure 030: Using lambda with variable variables +--FILE-- +<?php + +$b = function() { return func_get_args(); }; +$a = 'b'; +var_dump($$a(1)); +var_dump($$a->__invoke(2)); + +?> +--EXPECT-- +array(1) { + [0]=> + int(1) +} +array(1) { + [0]=> + int(2) +} |