Some PHP function signatures

code, php Add comments

The function signature for assert handlers:

function assert_handler( $file, $line, $message )

and for error handlers:

function error_handler( $errno, $message, $file, $line, $errcontext )

How to set an assert handler:

assert_options( ASSERT_CALLBACK, 'assert_handler' )

And an error handler:

set_error_handler( 'error_handler' )

Nobody could get it this wrong by chance. I think it’s wilful.

Leave a Reply

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Login