1--TEST-- 2Observer: fatal errors caught with zend_try will not fire end handlers prematurely 3--EXTENSIONS-- 4zend_test 5soap 6--INI-- 7zend_test.observer.enabled=1 8zend_test.observer.observe_all=1 9zend_test.observer.show_return_value=1 10--FILE-- 11<?php 12function foo() 13{ 14 // ext/soap catches a zend_bailout and then throws an exception 15 $client = new SoapClient('foo'); 16} 17 18function main() 19{ 20 foo(); 21} 22 23// try/catch is on main() to ensure ZEND_HANDLE_EXCEPTION does not fire the end handlers again 24try { 25 main(); 26} catch (SoapFault $e) { 27 echo $e->getMessage() . PHP_EOL; 28} 29 30echo 'Done.' . PHP_EOL; 31?> 32--EXPECTF-- 33<!-- init '%s%eobserver_error_%d.php' --> 34<file '%s%eobserver_error_%d.php'> 35 <!-- init main() --> 36 <main> 37 <!-- init foo() --> 38 <foo> 39 <!-- init SoapClient::__construct() --> 40 <SoapClient::__construct> 41 <!-- Exception: SoapFault --> 42 </SoapClient::__construct:NULL> 43 <!-- Exception: SoapFault --> 44 </foo:NULL> 45 <!-- Exception: SoapFault --> 46 </main:NULL> 47 <!-- init Exception::getMessage() --> 48 <Exception::getMessage> 49 </Exception::getMessage:'SOAP-ERROR: Parsing WSDL: Couldn\'t load from \'foo\' : failed to load external entity "foo" 50'> 51SOAP-ERROR: Parsing WSDL: Couldn't load from 'foo' : failed to load external entity "foo" 52 53Done. 54</file '%s%eobserver_error_%d.php'> 55