CaptainChainsaw Posted February 19, 2013 Share Posted February 19, 2013 Hi, Just a quick question. Would I have to quote "False" when testing for the response condition here? if($SOAP_RESPONSE->DataName == False){ // do something } if($SOAP_RESPONSE->DataName == "False"){ // do something else } In the XML response: <DataName>False<DataName> I thought it should work without quotes. Cheers Quote Link to comment https://forums.phpfreaks.com/topic/274682-simple-soap-question/ Share on other sites More sharing options...
Jessica Posted February 19, 2013 Share Posted February 19, 2013 The XML actually contains the string False, not the boolean value false. While PHP has loose typing I don't believe it will convert String "False" to boolean false, that would most likely cause the opposite effect of what the dev wanted. Quote Link to comment https://forums.phpfreaks.com/topic/274682-simple-soap-question/#findComment-1413343 Share on other sites More sharing options...
CaptainChainsaw Posted February 19, 2013 Author Share Posted February 19, 2013 That makes sense, thank you Quote Link to comment https://forums.phpfreaks.com/topic/274682-simple-soap-question/#findComment-1413349 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.