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 7fdcb6c commit 3f26b83Copy full SHA for 3f26b83
Zend/tests/partial_application/clone.phpt
@@ -4,21 +4,23 @@ Closure application clone
4
<?php
5
6
class C {
7
- public $a;
8
- public $b;
+ public function __construct(
+ public mixed $a,
9
+ public mixed $b,
10
+ ) { }
11
}
12
13
$clone = clone(?);
-var_dump($clone(new C));
14
+var_dump($clone(new C(1, 2)));
15
16
$clone = clone(...);
17
+var_dump($clone(new C(3, 4)));
18
-$clone = clone(new C, ?);
-var_dump($clone(['a' => 1]));
19
+$clone = clone(new C(5, 6), ?);
20
+var_dump($clone(['a' => 7]));
21
-$clone = clone(?, ['a' => 1]);
22
+$clone = clone(?, ['a' => 8]);
23
+var_dump($clone(new C(9, 10)));
24
25
?>
26
--EXPECTF--
0 commit comments