1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 10:43:30 +02:00
Files
archived-php-src/Zend/tests/instanceof_001.phpt
T
Nikita Popov ee16d99504 Remove create_function()
Deprecated in PHP 7.2 as part of
https://wiki.php.net/rfc/deprecations_php_7_2.
2019-01-28 15:58:23 +01:00

30 lines
572 B
PHP

--TEST--
Testing instanceof operator with several operators
--FILE--
<?php
$a = new stdClass;
var_dump($a instanceof stdClass);
var_dump(new stdCLass instanceof stdClass);
$b = 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)
bool(true)
bool(true)
bool(false)
Recoverable fatal error: Object of class stdClass could not be converted to string in %s on line %d