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 a612954 commit 2a3d393Copy full SHA for 2a3d393
Zend/tests/pattern_matching/is/and.phpt
@@ -3,12 +3,19 @@ And pattern
3
--FILE--
4
<?php
5
6
+interface A {}
7
+interface B {}
8
+interface C {}
9
+class Foo implements A, B {}
10
+
11
var_dump(1 is (int&1));
12
var_dump(2 is (int&(1|2)));
13
var_dump(3 is (float&1));
14
var_dump(4 is (int&float));
15
var_dump([] is ([]&[...]));
16
var_dump('foo' is (string&'bar'));
17
+var_dump(new Foo() is (A&B));
18
+var_dump(new Foo() is (A&C));
19
20
?>
21
--EXPECT--
@@ -18,3 +25,5 @@ bool(false)
25
bool(false)
26
bool(true)
27
28
+bool(true)
29
+bool(false)
0 commit comments