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--EXPECTF--
35Deprecated: PHP Startup: assert.warning INI setting is deprecated in Unknown on line 0
36
37Deprecated: PHP Startup: assert.exception INI setting is deprecated in Unknown on line 0
38
39Deprecated: Constant ASSERT_ACTIVE is deprecated in %s on line %d
40
41Deprecated: Function assert_options() is deprecated in %s on line %d
42
43Deprecated: Constant ASSERT_WARNING is deprecated in %s on line %d
44
45Deprecated: Function assert_options() is deprecated in %s on line %d
46
47Deprecated: Constant ASSERT_CALLBACK is deprecated in %s on line %d
48
49Deprecated: Function assert_options() is deprecated in %s on line %d
50assertion failed - a - 18,"assert($a != 0)"
51
52Deprecated: ini_set(): assert.callback INI setting is deprecated in %s on line %d
53assertion failed - b - 22,"assert($a != 0)"
54