which is slower? error surpressing or a dedicated function?
<p>A simple question.</p>

<p>Take this:</p>

<pre><code>$data = array('one'=&gt;'1','three'=&gt;'3');
</code></pre>

<p>Now which is better?
This:</p>

<pre><code>echo @$data['two'];
</code></pre>

<p>or this:</p>

<pre><code>function val($data,$key,$default){
  if(isset($data[$key])){
    return $data[$key];
  }
  return $default;
}
echo val($data,'two','');
</code></pre>

<p>or this:</p>

<pre><code>echo isset($data['two'])?$data['two']:'';
</code></pre>

<p><strong>or something else?</strong></p>

<p>avoiding the notice: <strong>Notice</strong>: Undefined index: two in document on line #num</p>

<p>which one is the most efficient, and which one should I use?
I am wondering that maybe the super-slow error suppressing might be faster than having a dedicated function?</p>

<p>p.s. most efficient and which used will most likely be different</p>
