xref: /PHP-7.4/Zend/tests/assert/expect_018.phpt (revision c100a742)
1--TEST--
2test assertions in namespace
3--INI--
4zend.assertions=1
5assert.exception=0
6--FILE--
7<?php
8namespace Foo;
9
10ini_set("zend.assertions", 0);
11var_dump(\assert(false));
12var_dump(\assert(true));
13var_dump(assert(false));
14var_dump(assert(true));
15ini_set("zend.assertions", 1);
16var_dump(\assert(false));
17var_dump(\assert(true));
18var_dump(assert(false));
19var_dump(assert(true));
20?>
21--EXPECTF--
22bool(true)
23bool(true)
24bool(true)
25bool(true)
26
27Warning: assert(): assert(false) failed in %sexpect_018.php on line 10
28bool(false)
29bool(true)
30
31Warning: assert(): assert(false) failed in %sexpect_018.php on line 12
32bool(false)
33bool(true)
34