<p>I'm pretty sure the answer to this question is no, but in case there's some PHP guru</p>

<p>is it possible to write a function in a way where invalid arguments or non existent variables can be passed in and php will not error without the use of <code>'@'</code></p>

<p>Much like empty and isset do. You can pass in a variable you just made up and it won't error.</p>

<pre><code>ex:

empty($someBogusVar); // no error

myHappyFunction($someBogusVar); // Php warning / notice
</code></pre>

No, because this isn't really anything to do with the function; the error is coming from attempting to de-reference a non-existent array key. You can change the warning level of your PHP setup to surpress these errors, but you're better off just not doing this.
Having said that, you
could
do something like
```
```
function safeLookup($array, $key)
{
  if (isset($array, $key))
    return $array[$key];

  return 0;
}
```
```
And use it in place of array key lookup
```
```
defaultValue(safeLookup($foo, "bar"), "baz);
```
```
Now I need to take a shower :)