c

You are currently browsing articles tagged c.

API Archaeology. Heh.

If he thinks he has troubles, he should try PHP’s string and array libraries. You can really see the accretion of “thought” there. On a related note, here are some signatures for various PHP error handlers. First, an assert handler:

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

an error handler:

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.