1--TEST-- 2Catch method calls on non-objects raise recoverable errors 3--FILE-- 4<?php 5set_error_handler(function($code, $message) { 6 var_dump($code, $message); 7}); 8 9$x= null; 10try { 11 var_dump($x->method()); 12} catch (Error $e) { 13 var_dump($e->getCode(), $e->getMessage()); 14} 15echo "Alive\n"; 16?> 17--EXPECTF-- 18 19int(0) 20string(%d) "Call to a member function method() on null" 21Alive 22