1--TEST-- 2assert() - set callback using ini_set() 3--INI-- 4assert.active = 1 5assert.warning = 0 6assert.callback = 7assert.bail = 0 8assert.exception=0 9--FILE-- 10<?php 11function a($file, $line, $unused, $desc) 12{ 13 echo "assertion failed - a - $line,\"$desc\"\n"; 14} 15 16function b($file, $line, $unused, $desc) 17{ 18 echo "assertion failed - b - $line,\"$desc\"\n"; 19} 20 21assert_options(ASSERT_ACTIVE,1); 22assert_options(ASSERT_WARNING,0); 23 24$a = 0; 25 26assert_options(ASSERT_CALLBACK, "a"); 27assert($a != 0); 28 29 /* Modify call back using ini_set() */ 30ini_set("assert.callback", "b"); 31assert($a != 0); 32 33?> 34--EXPECT-- 35assertion failed - a - 18,"assert($a != 0)" 36assertion failed - b - 22,"assert($a != 0)" 37