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 7444fdd commit 14531b0Copy full SHA for 14531b0
Zend/tests/named_params/func_get_args.phpt
@@ -0,0 +1,29 @@
1
+--TEST--
2
+Behavior of func_get_args() and friends with named parameters
3
+--FILE--
4
+<?php
5
+
6
+function test($a, $b = 'b', $c = 'c') {
7
+ var_dump(func_num_args());
8
+ var_dump(func_get_args());
9
+ var_dump(func_get_arg(0));
10
+ var_dump(func_get_arg(1));
11
+ var_dump(func_get_arg(2));
12
+}
13
14
+test(c: 'C', a: 'A');
15
16
+?>
17
+--EXPECT--
18
+int(3)
19
+array(3) {
20
+ [0]=>
21
+ string(1) "A"
22
+ [1]=>
23
+ string(1) "b"
24
+ [2]=>
25
+ string(1) "C"
26
27
+string(1) "A"
28
+string(1) "b"
29
+string(1) "C"
0 commit comments