diff options
Diffstat (limited to 'src/tests/disable_function/disabled_functions_param_int.phpt')
| -rw-r--r-- | src/tests/disable_function/disabled_functions_param_int.phpt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/tests/disable_function/disabled_functions_param_int.phpt b/src/tests/disable_function/disabled_functions_param_int.phpt new file mode 100644 index 0000000..e8b0a42 --- /dev/null +++ b/src/tests/disable_function/disabled_functions_param_int.phpt | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | --TEST-- | ||
| 2 | Disable functions | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_int.ini | ||
| 7 | --FILE-- | ||
| 8 | <?php | ||
| 9 | function foobar($id) { | ||
| 10 | echo $id."\n"; | ||
| 11 | } | ||
| 12 | foobar(1); | ||
| 13 | foobar(42); | ||
| 14 | foobar(1337); | ||
| 15 | foobar(13374242); | ||
| 16 | foobar(0x2A); | ||
| 17 | foobar("10"); | ||
| 18 | ?> | ||
| 19 | --EXPECTF-- | ||
| 20 | 1 | ||
| 21 | |||
| 22 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'foobar', because its argument '$id' content (42) matched a rule in %a/disabled_functions_param_int.php on line 3 \ No newline at end of file | ||
