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 59873a7 commit 2beea97Copy full SHA for 2beea97
Zend/tests/pipe_operator/mixed_callable_call.phpt
@@ -31,6 +31,11 @@ function _double(int $x): int {
31
return $x * 2;
32
}
33
34
+function multiplier(int $x): \Closure
35
+{
36
+ return fn($y) => $x * $y;
37
+}
38
+
39
$test = new _Test();
40
41
$add3 = fn($x) => _add($x, 3);
@@ -41,9 +46,10 @@ $res1 = 2
46
|> $add3
42
47
|> fn($x) => _area($x, 2)
43
48
|> _double(...)
49
+ |> multiplier(3)
44
50
;
45
51
52
var_dump($res1);
53
?>
54
--EXPECT--
-int(40)
55
+int(120)
0 commit comments