summaryrefslogtreecommitdiff
path: root/Zend/tests/methods-on-non-objects-catch.phpt
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2015-03-09 13:57:15 +0100
committerNikita Popov <nikic@php.net>2015-03-09 14:01:32 +0100
commit1c94ff0595bbe6f3df8058aff7252bda09dc4a15 (patch)
treeefe488bc3292d544657fca92c4347c9b872931eb /Zend/tests/methods-on-non-objects-catch.phpt
parent2f156c61f19a889c8ed39fe8eb3b3220555db647 (diff)
downloadphp-git-1c94ff0595bbe6f3df8058aff7252bda09dc4a15.tar.gz
Implement engine exceptions
RFC: https://wiki.php.net/rfc/engine_exceptions_for_php7 Pending changes regarding naming of BaseException and whether it should be an interface.
Diffstat (limited to 'Zend/tests/methods-on-non-objects-catch.phpt')
-rw-r--r--Zend/tests/methods-on-non-objects-catch.phpt7
1 files changed, 5 insertions, 2 deletions
diff --git a/Zend/tests/methods-on-non-objects-catch.phpt b/Zend/tests/methods-on-non-objects-catch.phpt
index bbfadac107..b38da3657b 100644
--- a/Zend/tests/methods-on-non-objects-catch.phpt
+++ b/Zend/tests/methods-on-non-objects-catch.phpt
@@ -7,12 +7,15 @@ set_error_handler(function($code, $message) {
});
$x= null;
-var_dump($x->method());
+try {
+ var_dump($x->method());
+} catch (EngineException $e) {
+ var_dump($e->getCode(), $e->getMessage());
+}
echo "Alive\n";
?>
--EXPECTF--
int(4096)
string(%d) "Call to a member function method() on null"
-NULL
Alive