summaryrefslogtreecommitdiff
path: root/src/tests/disable_function/disabled_functions_ret3.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/disable_function/disabled_functions_ret3.phpt')
-rw-r--r--src/tests/disable_function/disabled_functions_ret3.phpt23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/tests/disable_function/disabled_functions_ret3.phpt b/src/tests/disable_function/disabled_functions_ret3.phpt
new file mode 100644
index 0000000..dc60c43
--- /dev/null
+++ b/src/tests/disable_function/disabled_functions_ret3.phpt
@@ -0,0 +1,23 @@
1--TEST--
2Disable functions check on `ret`.
3--SKIPIF--
4<?php if (!extension_loaded("snuffleupagus")) die "skip"; ?>
5--INI--
6sp.configuration_file={PWD}/config/disabled_functions_ret.ini
7memory_limit=-1
8--FILE--
9<?php
10class Bob {
11 function a() {
12 echo("We're in function `a`.\n");
13 return 2;
14 }
15}
16$b = new Bob();
17echo "`a` returned: " . $b->a() . ".\n";
18echo("We're at the end of the execution.\n");
19?>
20--EXPECTF--
21We're in function `a`.
22
23Fatal error: [snuffleupagus][disabled_function] Aborted execution on return of the function 'Bob::a', because the function returned '2', which matched a rule in %a/disabled_functions_ret3.php on line 9 \ No newline at end of file