]> granicus.if.org Git - php/commitdiff
Added test
authorDmitry Stogov <dmitry@zend.com>
Wed, 11 May 2016 09:55:33 +0000 (12:55 +0300)
committerDmitry Stogov <dmitry@zend.com>
Wed, 11 May 2016 09:55:33 +0000 (12:55 +0300)
Zend/tests/generators/generator_with_arg_unpacking.phpt [new file with mode: 0644]

diff --git a/Zend/tests/generators/generator_with_arg_unpacking.phpt b/Zend/tests/generators/generator_with_arg_unpacking.phpt
new file mode 100644 (file)
index 0000000..edf0baf
--- /dev/null
@@ -0,0 +1,12 @@
+--TEST--
+Generators with arguments unpacking
+--FILE--
+<?php
+(function() { yield; })(...range(1, 16384));
+call_user_func_array(function() { yield; }, range(1, 16384));
+$g = (function() { yield; })(...range(1, 16384));
+$g = call_user_func_array(function() { yield; }, range(1, 16384));
+echo "OK\n";
+?>
+--EXPECT--
+OK
\ No newline at end of file