xref: /PHP-7.4/Zend/tests/instanceof_001.phpt (revision a31f4642)
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 = create_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--EXPECTF--
21bool(true)
22bool(true)
23
24Deprecated: Function create_function() is deprecated in %s on line %d
25bool(true)
26bool(true)
27bool(false)
28