--TEST-- Converting undefined index/offset notice to exception --FILE-- getMessage(), "\n"; } var_dump($test); try { $test["key"] .= "xyz"; } catch (Exception $e) { echo $e->getMessage(), "\n"; } var_dump($test); unset($test); try { $GLOBALS["test"] .= "xyz"; } catch (Exception $e) { echo $e->getMessage(), "\n"; } try { var_dump($test); } catch (Exception $e) { echo $e->getMessage(), "\n"; } ?> --EXPECT-- Undefined offset: 0 array(0) { } Undefined index: key array(0) { } Undefined index: test Undefined variable: test