2008-05-11 11:15:13 +08:00
|
|
|
--TEST--
|
|
|
|
Testing instanceof operator with several operators
|
|
|
|
--FILE--
|
2018-09-17 01:16:42 +08:00
|
|
|
<?php
|
2008-05-11 11:15:13 +08:00
|
|
|
|
|
|
|
$a = new stdClass;
|
|
|
|
var_dump($a instanceof stdClass);
|
|
|
|
|
|
|
|
var_dump(new stdCLass instanceof stdClass);
|
|
|
|
|
|
|
|
$b = create_function('', 'return new stdClass;');
|
|
|
|
var_dump($b() instanceof stdClass);
|
|
|
|
|
|
|
|
$c = array(new stdClass);
|
|
|
|
var_dump($c[0] instanceof stdClass);
|
|
|
|
|
|
|
|
var_dump(@$inexistent instanceof stdClass);
|
|
|
|
|
|
|
|
var_dump("$a" instanceof stdClass);
|
|
|
|
|
|
|
|
?>
|
|
|
|
--EXPECTF--
|
|
|
|
bool(true)
|
|
|
|
bool(true)
|
2017-01-31 05:09:32 +08:00
|
|
|
|
|
|
|
Deprecated: Function create_function() is deprecated in %s on line %d
|
2008-05-11 11:15:13 +08:00
|
|
|
bool(true)
|
|
|
|
bool(true)
|
|
|
|
bool(false)
|
|
|
|
|
2016-09-03 19:05:37 +08:00
|
|
|
Recoverable fatal error: Object of class stdClass could not be converted to string in %s on line %d
|