xref: /PHP-7.0/Zend/tests/bug69315.phpt (revision 5c31c8c6)
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
16--EXPECTF--
17bool(false)
18bool(true)
19
20Warning: strlen() has been disabled for security reasons in %sbug69315.php on line %d
21NULL
22
23Warning: defined() has been disabled for security reasons in %sbug69315.php on line %d
24NULL
25
26Warning: constant() has been disabled for security reasons in %sbug69315.php on line %d
27NULL
28
29Warning: call_user_func() has been disabled for security reasons in %sbug69315.php on line %d
30NULL
31
32Warning: is_string() has been disabled for security reasons in %sbug69315.php on line %d
33NULL
34