mirror of
https://github.com/php/php-src.git
synced 2024-12-13 20:05:26 +08:00
a31f46421d
RFC: https://wiki.php.net/rfc/tostring_exceptions And convert some object to string conversion related recoverable fatal errors into Error exceptions. Improve exception safety of internal code performing string conversions.
28 lines
513 B
PHP
28 lines
513 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 = 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);
|
|
|
|
?>
|
|
--EXPECTF--
|
|
bool(true)
|
|
bool(true)
|
|
|
|
Deprecated: Function create_function() is deprecated in %s on line %d
|
|
bool(true)
|
|
bool(true)
|
|
bool(false)
|