title: How to catch this error: "Notice: Undefined offset: 0"
body: <p>I want to catch this error:</p>
  
  <pre><code>$a[1] = 'jfksjfks';
  try {
        $b = $a[0];
  } catch (\Exception $e) {
        echo "jsdlkjflsjfkjl";
  }
  </code></pre>
  
  <p><strong>Edit:</strong> in fact, I got this error on the following line:
  <code>$parse = $xml-&gt;children[0]-&gt;children[0]-&gt;toArray();</code></p>