How does isset not throw an error when evaluating array properties?

Viewed 284

Whenever I try to access a property of an array that does not exist, php throws an ERROR_NOTICE that reads like this:

Notice: Undefined offset: BLANK in BLANK on line BLANK

$a = array("a","b","c");

$a[4]; //throws an error

Instead, if I use isset to test for the existence of this property, this error is not thrown.

$a = array("a","b","c");

isset($a[4]); //does not throw an error

Since php does evaluate arguments before passing them to a function, how does isset avoid to throw an error?

1 Answers
Related