We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b6e3c7 commit 9d90badCopy full SHA for 9d90bad
Zend/tests/partial_function/variadics-only.phpt
@@ -0,0 +1,28 @@
1
+--TEST--
2
+Variadics only
3
+--FILE--
4
+<?php
5
+
6
+function variadic(...$values): void {
7
+ var_dump($values);
8
+}
9
10
+$p = variadic('Foo', ?, bar: 'Bar');
11
12
+$p('Baz', qux: 'Qux', quux: 'Quux');
13
14
+?>
15
+--EXPECT--
16
+array(5) {
17
+ [0]=>
18
+ string(3) "Foo"
19
+ [1]=>
20
+ string(3) "Baz"
21
+ ["bar"]=>
22
+ string(3) "Bar"
23
+ ["qux"]=>
24
+ string(3) "Qux"
25
+ ["quux"]=>
26
+ string(4) "Quux"
27
28
0 commit comments