xref: /PHP-7.2/Zend/tests/assert/expect_016.phpt (revision c100a742)
1--TEST--
2test enable/disable assertions at runtime (assertions not completely disabled)
3--INI--
4zend.assertions=0
5assert.exception=0
6--FILE--
7<?php
8ini_set("zend.assertions", 0);
9var_dump(assert(false));
10var_dump(assert(true));
11ini_set("zend.assertions", 1);
12var_dump(assert(false));
13var_dump(assert(true));
14ini_set("zend.assertions", -1);
15?>
16--EXPECTF--
17bool(true)
18bool(true)
19
20Warning: assert(): assert(false) failed in %sexpect_016.php on line 6
21bool(false)
22bool(true)
23
24Warning: zend.assertions may be completely enabled or disabled only in php.ini in %sexpect_016.php on line 8
25