title: Handling "Undefined Index" in PHP with SYmfony
body: <p>I am building an app with Symfony 2, and I am wondering, how could I handle errors when I try to read a index in an array that doesn't exist? Sadly this kind of errors don't throw exceptions, so I can't really use a try-catch block.</p>
  
  <p>Example:</p>
  
  <pre class="lang-php prettyprint-override"><code>$test = array();
  $test["323"];       // Undefined index error!
  </code></pre>
  
  <p>Please, ideas how to handle this errors?</p>
  
  <p><strong>Update</strong>: I have seen many solutions with <code>isset</code>. The problem with this is that I would have to do it with every single access to an array index. Can anyone offer me a more DRY solution?</p>