Skip to content

Commit d836c17

Browse files
committed
Add a test for comparison operators.
1 parent ec75335 commit d836c17

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
--TEST--
2+
Pipe binds higher than comparison
3+
--FILE--
4+
<?php
5+
6+
function _test1(int $a): int {
7+
return $a * 2;
8+
}
9+
10+
// This will error without the parens,
11+
// as it will try to compare a closure to an int first.
12+
$res1 = (5 |> _test1(...)) == 10 ;
13+
var_dump($res1);
14+
15+
?>
16+
--EXPECT--
17+
bool(true)

0 commit comments

Comments
 (0)