title: Disable 'Call to a member function *** on null' in PHP?
body: <p>Very simple question as the title says.</p>
  
  <p>I want PHP to behave rather than give me a error, it might just return another null to me when I called a method on a null object.</p>
  
  <p>PHP on elsewhere looks like it doesn't care anything. </p>
  
  <p>It returns null if you get a non-existed key from a array:</p>
  
  <pre><code>$foo = ['foo'=&gt;'foo'];
  var_dump($foo['bar']);
  </code></pre>
  
  <p>It returns null even if the array is null:</p>
  
  <pre><code>$foo = null;
  var_dump($foo['bar']);
  </code></pre>
  
  <p>But it suddenly becomes serious to an object!</p>