Jump to content

Simple SOAP question


CaptainChainsaw

Recommended Posts

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 :)

Link to comment
https://forums.phpfreaks.com/topic/274682-simple-soap-question/
Share on other sites

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.