1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 17:22:15 +01:00
Files
archived-php-src/Zend/tests/assert/expect_016.phpt
2015-10-18 02:23:43 -05:00

25 lines
581 B
PHP

--TEST--
test enable/disable assertions at runtime (assertions not completely disabled)
--INI--
zend.assertions=0
assert.exception=0
--FILE--
<?php
ini_set("zend.assertions", 0);
var_dump(assert(false));
var_dump(assert(true));
ini_set("zend.assertions", 1);
var_dump(assert(false));
var_dump(assert(true));
ini_set("zend.assertions", -1);
?>
--EXPECTF--
bool(true)
bool(true)
Warning: assert(): assert(false) failed in %sexpect_016.php on line 6
bool(false)
bool(true)
Warning: zend.assertions may be completely enabled or disabled only in php.ini in %sexpect_016.php on line 8