|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-08-01 10:40 UTC] dmitry@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 15:00:01 2025 UTC |
Description: ------------ All __destruct functions of all objects in memory are not called if a SoapFault exception is thrown and caught. Reproduce code: --------------- <?php class foo { function __construct(){ $foo = new SoapClient('http://php.net/problem_file.wsdl'); } 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"; } ?> Expected result: ---------------- SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://php.net/problem_file.wsdl' I never get executed. I don't get executed either. Actual result: -------------- SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://php.net/problem_file.wsdl'