diff options
| author | jvoisin | 2017-11-29 11:36:57 +0100 |
|---|---|---|
| committer | GitHub | 2017-11-29 11:36:57 +0100 |
| commit | 10437787b0e8ede80976de4a1c22775fc1282f36 (patch) | |
| tree | 1ab911ab000989b98449475eda655a797e278049 /src/tests/disabled_functions_eval.phpt | |
| parent | 8df77884f38e7a7334b56aafe2f441567f175af8 (diff) | |
Implement eval hooking
It's not possible to hook the `eval` builtin like other functions.
Diffstat (limited to 'src/tests/disabled_functions_eval.phpt')
| -rw-r--r-- | src/tests/disabled_functions_eval.phpt | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/tests/disabled_functions_eval.phpt b/src/tests/disabled_functions_eval.phpt index 0beaefe..7bd6b4b 100644 --- a/src/tests/disabled_functions_eval.phpt +++ b/src/tests/disabled_functions_eval.phpt | |||
| @@ -3,13 +3,12 @@ Disable functions - eval | |||
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_eval.ini |
| 7 | --XFAIL-- | ||
| 8 | --FILE-- | 7 | --FILE-- |
| 9 | <?php | 8 | <?php |
| 10 | $var = 1234; | 9 | $var = 123456789; |
| 11 | eval('$var = 1337;'); | 10 | eval('$var = 1337 + 1337;'); |
| 12 | print("Variable: $var\n"); | 11 | print("Variable: $var\n"); |
| 13 | ?> | 12 | ?> |
| 14 | --EXPECTF-- | 13 | --EXPECTF-- |
| 15 | [snuffleupagus][0.0.0.0][disabled_function][drop] The call to the function 'eval' in %a/tests/disabled_functions_eval.php:%d has been disabled, because it matched a rule. | 14 | [snuffleupagus][0.0.0.0][disabled_function][drop] The call to the function 'eval' in %a/tests/disabled_functions_eval.php(%d) : eval()'d code:%d has been disabled. |
