summaryrefslogtreecommitdiff
path: root/Zend/tests/bug69315.phpt
blob: 82017c055241008cb3a3d208ea7d5f72bdc5b436 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
--TEST--
Bug #69315 (disable_functions behaviors inconsistently)
--INI--
disable_functions=strlen,defined,call_user_func,constant,is_string
--FILE--
<?php

var_dump(function_exists("strlen"));
var_dump(is_callable("strlen"));
try {
    var_dump(strlen("xxx"));
} catch (Error $e) {
    echo $e->getMessage(), "\n";
}
try {
    var_dump(defined("PHP_VERSION"));
} catch (Error $e) {
    echo $e->getMessage(), "\n";
}
try {
    var_dump(constant("PHP_VERSION"));
} catch (Error $e) {
    echo $e->getMessage(), "\n";
}
try {
    var_dump(call_user_func("strlen"));
} catch (Error $e) {
    echo $e->getMessage(), "\n";
}
try {
    var_dump(is_string("xxx"));
} catch (Error $e) {
    echo $e->getMessage(), "\n";
}
try {
    var_dump(is_string());
} catch (Error $e) {
    echo $e->getMessage(), "\n";
}

?>
--EXPECT--
bool(false)
bool(false)
Call to undefined function strlen()
Call to undefined function defined()
Call to undefined function constant()
Call to undefined function call_user_func()
Call to undefined function is_string()
Call to undefined function is_string()