“What were they thinking?”: “They were thinking like C programmers”

programming Add comments

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.

Leave a Reply

You must be logged in to post a comment.

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