php-src/Zend/tests/bug69315.phpt

51 lines
1.0 KiB
Plaintext
Raw Normal View History

2015-03-27 09:50:36 +00:00
--TEST--
Bug #69315 (disable_functions behaviors inconsistently)
--INI--
disable_functions=strlen,defined,call_user_func,constant,is_string
2015-03-27 09:50:36 +00:00
--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--
2015-03-27 09:50:36 +00:00
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()