I'm wondering why this PHP code doesn't generate an exception like Java. Essentially, I'm trying to access an empty array, which would generate an index out of bound exception in Java. In PHP, I get "Notice: Undefined offset: 1 in xxxxx.php on line xx" instead and my script continues to finish. $myarray = array(); try { echo $myarray[1]; echo "DONE"; } catch(Exception $e) { echo "EXCEPTION!!!"; } Code (markup):