1--TEST-- 2assert() - set callback using ini_set() 3--INI-- 4assert.active = 1 5assert.warning = 0 6assert.callback = 7assert.bail = 0 8assert.quiet_eval = 1 9--FILE-- 10<?php 11function a($file,$line,$myev) 12{ 13 echo "assertion failed - a - $line,\"$myev\"\n"; 14} 15 16function b($file,$line,$myev) 17{ 18 echo "assertion failed - b - $line,\"$myev\"\n"; 19} 20 21assert_options(ASSERT_ACTIVE,1); 22assert_options(ASSERT_QUIET_EVAL,1); 23assert_options(ASSERT_WARNING,0); 24 25$a = 0; 26 27assert_options(ASSERT_CALLBACK,"a"); 28assert('$a != 0'); 29 30 /* Modify call back using ini_set() */ 31ini_set("assert.callback", "b"); 32assert('$a != 0'); 33 34?> 35==DONE== 36--EXPECTF-- 37Deprecated: assert(): Calling assert() with a string argument is deprecated in %s on line %d 38assertion failed - a - %d,"$a != 0" 39 40Deprecated: assert(): Calling assert() with a string argument is deprecated in %s on line %d 41assertion failed - b - %d,"$a != 0" 42==DONE== 43