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.quiet_eval = 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));
18$sa = "0 != 0";
19var_dump($r2=assert($sa));
20$sa = "0 == 0";
21var_dump($r2=assert($sa));
22
23//switch warning on and test return value
24var_dump($rao=assert_options(ASSERT_WARNING, 0));
25--EXPECTF--
26int(0)
27f1 called
28
29Warning: assert(): Assertion "0 != 0" failed in %s on line 10
30NULL
31bool(true)
32int(1)
33