1--TEST-- 2assert() - error - invalid params 3--INI-- 4assert.active = 1 5assert.warning = 1 6assert.callback = f1 7assert.quiet_eval = 1 8assert.bail = 0 9--FILE-- 10<?php 11function f1() 12{ 13 echo "f1 called\n"; 14} 15function handler($errno, $errstr) { 16 echo "in handler()\n\n"; 17 assert(E_RECOVERABLE_ERROR === $errno); 18 var_dump($errstr); 19} 20 21//Wrong number of parameters for assert_options() 22assert_options(ASSERT_WARNING, 1); 23var_dump($rao = assert_options(ASSERT_CALLBACK, "f1", 1)); 24 25 26//Unknown option for assert_options() 27var_dump($rao=assert_options("F1", "f1")); 28 29//Wrong number of parameters for assert() 30$sa="0 != 0"; 31var_dump($r2 = assert($sa, "message", 1)); 32 33 34//Catch recoverable error with handler 35var_dump($rc = assert('aa=sd+as+safsafasfaçsafçsafç')); 36--EXPECTF-- 37Warning: assert_options() expects at most 2 parameters, 3 given in %s on line %d 38NULL 39 40Warning: assert_options() expects parameter 1 to be integer, string given in %s on line %d 41NULL 42 43Warning: assert() expects at most 2 parameters, 3 given in %s on line %d 44NULL 45