Annotation of embedaddon/php/Zend/tests/instanceof_001.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Testing instanceof operator with several operators
! 3: --FILE--
! 4: <?php
! 5:
! 6: $a = new stdClass;
! 7: var_dump($a instanceof stdClass);
! 8:
! 9: var_dump(new stdCLass instanceof stdClass);
! 10:
! 11: $b = create_function('', 'return new stdClass;');
! 12: var_dump($b() instanceof stdClass);
! 13:
! 14: $c = array(new stdClass);
! 15: var_dump($c[0] instanceof stdClass);
! 16:
! 17: var_dump(@$inexistent instanceof stdClass);
! 18:
! 19: var_dump("$a" instanceof stdClass);
! 20:
! 21: ?>
! 22: --EXPECTF--
! 23: bool(true)
! 24: bool(true)
! 25: bool(true)
! 26: bool(true)
! 27: bool(false)
! 28:
! 29: Catchable fatal error: Object of class stdClass could not be converted to string in %s on line %d
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>