diff options
Diffstat (limited to 'src/tests/disable_function/disabled_function_local_var_8.phpt')
| -rw-r--r-- | src/tests/disable_function/disabled_function_local_var_8.phpt | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/tests/disable_function/disabled_function_local_var_8.phpt b/src/tests/disable_function/disabled_function_local_var_8.phpt new file mode 100644 index 0000000..1f1a0dc --- /dev/null +++ b/src/tests/disable_function/disabled_function_local_var_8.phpt | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | --TEST-- | ||
| 2 | Disable functions - match on a local variable | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini | ||
| 7 | --FILE-- | ||
| 8 | <?php | ||
| 9 | namespace qwe { | ||
| 10 | const ASD = 'qwerty'; | ||
| 11 | } | ||
| 12 | namespace asd { | ||
| 13 | const asd = 'qwe'; | ||
| 14 | echo "Valeur: " . \qwe\ASD . "\n"; | ||
| 15 | strlen("qwe"); | ||
| 16 | } | ||
| 17 | ?> | ||
| 18 | --EXPECTF-- | ||
| 19 | Valeur: qwerty | ||
| 20 | |||
| 21 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_function_local_var_8.php on line 8 \ No newline at end of file | ||
