|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2014-07-17 11:50 UTC] vosa at binaryparadise dot com
Description: ------------ --- From manual page: http://www.php.net/class.soapfault --- There's strange behavior of SoapFault instance when used in foreach construct. It behave almost like Transversable object, but it shouldn't. SoapFault extends Exception and none of these classes implements Transversable interface... Test script: --------------- print "Exception:\n"; foreach(new Exception('message') as $k => $v) print "$k: $v\n"; print "SoapFault:\n"; foreach(new Soapfault('faultcode', 'faultstring') as $k => $v) print "$k: $v\n"; Expected result: ---------------- Exception: SoapFault: Actual result: -------------- Exception: SoapFault: faultstring: faultstring faultcode: faultcode PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 16 05:00:01 2025 UTC |
And one thing: "They certainly are visible. Undocumented, but visible." Not all of them: <?php print "SoapFault:\n"; foreach(new Soapfault(null, null) as $k => $v) print "$k: $v\n"; // output: // SoapFault: // faultstring: // or print "SoapFault:\n"; foreach(new Soapfault(null, null, null, null, null, null) as $k => $v) print "$k: $v\n"; // output: // SoapFault: // faultstring: // headerfault: