1--TEST--
2assert() - basic - check switch on warnings using assert_options.
3--INI--
4assert.active = 1
5assert.warning = 0
6assert.callback = f1
7assert.bail = 0
8assert.exception=0
9--FILE--
10<?php
11function f1()
12{
13    echo "f1 called\n";
14}
15
16//switch warning on and test return value
17var_dump($rao=assert_options(ASSERT_WARNING, 1));
18var_dump($r2=assert(0 != 0));
19var_dump($r2=assert(0 == 0));
20
21//switch warning on and test return value
22var_dump($rao=assert_options(ASSERT_WARNING, 0));
23?>
24--EXPECTF--
25int(0)
26f1 called
27
28Warning: assert(): assert(0 != 0) failed in %s on line %d
29bool(false)
30bool(true)
31int(1)
32