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
No known key found for this signature in database
GPG Key ID: 3306078E3194AEBD

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()