Testing Error Handling

An error occurred in script '/home/khaduch/phpperc6.kenjhpics.com/chapters/ch08/handle_errors.php' on line 39: Undefined variable: var
Array
(
    [_GET] => Array
        (
        )

    [_POST] => Array
        (
        )

    [_COOKIE] => Array
        (
        )

    [_FILES] => Array
        (
        )

)

#0  my_error_handler(8, Undefined variable: var, /home/khaduch/phpperc6.kenjhpics.com/chapters/ch08/handle_errors.php, 39, Array ([_GET] => Array (),[_POST] => Array (),[_COOKIE] => Array (),[_FILES] => Array ())) called at [/home/khaduch/phpperc6.kenjhpics.com/chapters/ch08/handle_errors.php:39]

An error occurred in script '/home/khaduch/phpperc6.kenjhpics.com/chapters/ch08/handle_errors.php' on line 39: Invalid argument supplied for foreach()
Array
(
    [_GET] => Array
        (
        )

    [_POST] => Array
        (
        )

    [_COOKIE] => Array
        (
        )

    [_FILES] => Array
        (
        )

)

#0  my_error_handler(2, Invalid argument supplied for foreach(), /home/khaduch/phpperc6.kenjhpics.com/chapters/ch08/handle_errors.php, 39, Array ([_GET] => Array (),[_POST] => Array (),[_COOKIE] => Array (),[_FILES] => Array ())) called at [/home/khaduch/phpperc6.kenjhpics.com/chapters/ch08/handle_errors.php:39]

An error occurred in script '/home/khaduch/phpperc6.kenjhpics.com/chapters/ch08/handle_errors.php' on line 40: Division by zero
Array
(
    [_GET] => Array
        (
        )

    [_POST] => Array
        (
        )

    [_COOKIE] => Array
        (
        )

    [_FILES] => Array
        (
        )

)

#0  my_error_handler(2, Division by zero, /home/khaduch/phpperc6.kenjhpics.com/chapters/ch08/handle_errors.php, 40, Array ([_GET] => Array (),[_POST] => Array (),[_COOKIE] => Array (),[_FILES] => Array ())) called at [/home/khaduch/phpperc6.kenjhpics.com/chapters/ch08/handle_errors.php:40]