php-src/Zend/tests/methods-on-non-objects-catch.phpt

19 lines
306 B
Plaintext
Raw Normal View History

2014-04-19 12:01:16 +00:00
--TEST--
Catch method calls on non-objects raise recoverable errors
--FILE--
<?php
set_error_handler(function($code, $message) {
var_dump($code, $message);
});
$x= null;
var_dump($x->method());
echo "Alive\n";
?>
--EXPECTF--
int(4096)
string(%d) "Call to a member function method() on null"
2014-04-19 12:01:16 +00:00
NULL
Alive