Skip to content

Commit f6387f6

Browse files
kelunikbwoebi
authored andcommitted
Tests for in operator (traversables)
1 parent 36861e6 commit f6387f6

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
--TEST--
2+
In operator tests for traversables
3+
--FILE--
4+
<?php
5+
6+
function gen() {
7+
echo "1";
8+
yield "bar";
9+
echo "2";
10+
yield "foo";
11+
echo "3";
12+
}
13+
14+
var_dump("foo" in gen());
15+
var_dump("php" in gen());
16+
17+
?>
18+
--EXPECT--
19+
12bool(true)
20+
123bool(false)

0 commit comments

Comments
 (0)