1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Zend: Add test disabling assert() function

This commit is contained in:
Gina Peter Banyard
2024-08-06 13:21:18 +01:00
parent b9da6cb3a2
commit bc8909aac3

View File

@@ -0,0 +1,15 @@
--TEST--
Use disable_functions INI setting to disable assert()
--INI--
zend.assertions=1
disable_functions=assert
--FILE--
<?php
try {
assert(false && "Is this evaluated?");
} catch (Throwable $e) {
echo $e::class, ': ', $e->getMessage(), PHP_EOL;
}
?>
--EXPECT--
Error: Call to undefined function assert()