assert_options函数 设置断言的参数
assert 函数,检测一个断言
<?PHP // 激活断言,并设置它为 quiet assert_options(ASSERT_ACTIVE,1); assert_options(ASSERT_WARNING,0); assert_options(ASSERT_QUIET_EVAL,1); // 设置回调函数 assert_options(ASSERT_CALLBACK,'my_assert_handler'); // 让一则断言失败 assert('MysqL_query("")'); //创建处理函数 function my_assert_handler($file,$line,$code) { echo "error: File '$file' Line '$line' Code '$code'"; }