Skip to content

Commit 22c318c

Browse files
committed
Zend: Add test disabling assert() function
1 parent 76d8a09 commit 22c318c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
--TEST--
2+
Use disable_functions INI setting to disable assert()
3+
--INI--
4+
zend.assertions=1
5+
disable_functions=assert
6+
--FILE--
7+
<?php
8+
try {
9+
assert(false && "Is this evaluated?");
10+
} catch (Throwable $e) {
11+
echo $e::class, ': ', $e->getMessage(), PHP_EOL;
12+
}
13+
?>
14+
--EXPECT--
15+
Error: Call to undefined function assert()

0 commit comments

Comments
 (0)