Here is an exemple how to use the assertion callback function :<?php assert_options( ASSERT_CALLBACK, 'assert_callback'); function assert_callback( $script, $line, $message ) { echo 'You have a design error in your script <b>', $script,'</b> : line <b>', $line,'</b> :<br />'; echo '<b>', ereg_replace( '^.*//\*', '', $message ), '</b><br /><br />'; echo 'Open the source file and check it, because it\'s not a normal behaviour !'; exit; } $x = 3; assert('is_integer( $x ) && ($x >= 0) && ($x <= 10); //* $x must be an integer value from 0 to 10' ); echo "0 <= $x <= 10";?>assertion is usefull for "design by contract" methodology ...