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

ok
I don't get executed either.