1--TEST-- 2Bug #42151 (__destruct functions not called after catching a SoapFault exception) 3--EXTENSIONS-- 4soap 5--FILE-- 6<?php 7class foo { 8 function __construct(){ 9 $foo = @ new SoapClient('httpx://'); 10 } 11 function __destruct(){ 12 echo 'I never get executed.' . "\n"; 13 } 14} 15class bar { 16 function __destruct(){ 17 echo 'I don\'t get executed either.' . "\n"; 18 } 19} 20try { 21 $bar = new bar(); 22 $foo = new foo(); 23} catch (Exception $e){ 24 echo $e->getMessage() . "\n"; 25} 26echo "ok\n"; 27?> 28--EXPECTF-- 29SOAP-ERROR: Parsing WSDL: Couldn't load from 'httpx://' : failed to load %s 30 31ok 32I don't get executed either. 33