Consider:

Code:
<?php

if(isset($_GET['source'])) {
highlight_file(basename(__FILE__));
}

ini_set('display_errors','1');
error_reporting(E_ALL);

function handle_error($error_number, $error_message, $file='', $line=0, $context=array()) {
echo "$file:$line $error_number - $error_message<br/>";
}

if(is_null(set_error_handler('handle_error'))) {
echo '[error handler not set]<br/>';
}
else {
echo '[error handler is set]<br/>';
}

trigger_error('Testing...');
?>
outputs:
Code:
[error handler not set]
/home/adennis/public_html/mine/test.php:29 1024 - Testing...
Notice that it says *NOT set.

Anybody have a clue why? I assume that since error_handler returns previous error handling function, and that since it was the system handler set before, that system handler returns null. But if that is the case then php spec is ambiguouse because it says that on failure set_error_handler returns null. Go figure!

http://us3.php.net/manual/en/functio...or-handler.php