How to handle 'simplexml_load_string' error?
<p>I am looking to handle a situation whereby the XML file that I at trying to retrieve is not ready or is not available. </p>

<p>I am using:</p>

<pre><code> $object = simplexml_load_string($file);
</code></pre>

<p>Sometimes, I get the following error:</p>

<pre><code>'Start tag expected, '&lt;' not found in etc...'
</code></pre>

<p>I have tried the following, and it doesn't work.</p>

<pre><code> if($object === false){
 // code here
}
</code></pre>