xref: /php-src/Zend/tests/instanceof_001.phpt (revision 5dafd7b4)
1--TEST--
2Testing instanceof operator with several operators
3--FILE--
4<?php
5
6$a = new stdClass;
7var_dump($a instanceof stdClass);
8
9var_dump(new stdCLass instanceof stdClass);
10
11$b = function() { return new stdClass; };
12var_dump($b() instanceof stdClass);
13
14$c = array(new stdClass);
15var_dump($c[0] instanceof stdClass);
16
17var_dump(@$inexistent instanceof stdClass);
18
19?>
20--EXPECT--
21bool(true)
22bool(true)
23bool(true)
24bool(true)
25bool(false)
26