Annotation of embedaddon/php/ext/standard/tests/assert/assert_basic1.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: assert() - basic - check that assert can be switched off
3: --INI--
4: assert.active = 0
5: assert.warning = 0
6: assert.callback = f1
7: assert.bail = 0
8: assert.quiet_eval = 0
9: --FILE--
10: <?php
11: function f1()
12: {
13: echo "f1 called\n";
14: }
15:
16: //String assert
17: $sa = "0 != 0";
18: var_dump($r2=assert($sa));
19: $sa = "0 == 0";
20: var_dump($r2=assert($sa));
21:
22: //Non string assert
23: var_dump($r2=assert(0));
24: var_dump($r2=assert(1));
25: --EXPECTF--
26: bool(true)
27: bool(true)
28: bool(true)
29: bool(true)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>