xref: /PHP-7.4/Zend/tests/bug69315.phpt (revision d679f022)
1--TEST--
2Bug #69315 (disable_functions behaviors inconsistently)
3--INI--
4disable_functions=strlen,defined,call_user_func,constant,is_string
5--FILE--
6<?php
7
8var_dump(function_exists("strlen"));
9var_dump(is_callable("strlen"));
10var_dump(strlen("xxx"));
11var_dump(defined("PHP_VERSION"));
12var_dump(constant("PHP_VERSION"));
13var_dump(call_user_func("strlen"));
14var_dump(is_string("xxx"));
15--EXPECTF--
16bool(false)
17bool(true)
18
19Warning: strlen() has been disabled for security reasons in %sbug69315.php on line %d
20NULL
21
22Warning: defined() has been disabled for security reasons in %sbug69315.php on line %d
23NULL
24
25Warning: constant() has been disabled for security reasons in %sbug69315.php on line %d
26NULL
27
28Warning: call_user_func() has been disabled for security reasons in %sbug69315.php on line %d
29NULL
30
31Warning: is_string() has been disabled for security reasons in %sbug69315.php on line %d
32NULL
33