bug42151.phpt 667 B

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