summaryrefslogtreecommitdiff
path: root/src/tests/eval_blacklist/nested_eval_blacklist.phpt
diff options
context:
space:
mode:
authorjvoisin2019-02-23 12:06:51 +0100
committerjvoisin2019-02-23 12:12:45 +0100
commitd03c3c8d01f6f507bf844fec07477f30e3db61d9 (patch)
tree040773d005257a0541da580c26bbb2b0831155b2 /src/tests/eval_blacklist/nested_eval_blacklist.phpt
parenta48297dfc1144931e18073a87ed83ea337e3d37a (diff)
Fix the testsuite on php8.
In php8, it's non-trivial to hook strlen, since this function is usually optimized away by the compiler.
Diffstat (limited to 'src/tests/eval_blacklist/nested_eval_blacklist.phpt')
-rw-r--r--src/tests/eval_blacklist/nested_eval_blacklist.phpt8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tests/eval_blacklist/nested_eval_blacklist.phpt b/src/tests/eval_blacklist/nested_eval_blacklist.phpt
index 9671a65..244007e 100644
--- a/src/tests/eval_blacklist/nested_eval_blacklist.phpt
+++ b/src/tests/eval_blacklist/nested_eval_blacklist.phpt
@@ -6,7 +6,7 @@ Eval blacklist - nested eval
6sp.configuration_file={PWD}/config/eval_backlist.ini 6sp.configuration_file={PWD}/config/eval_backlist.ini
7--FILE-- 7--FILE--
8<?php 8<?php
9$a = strlen("1337 1337 1337"); 9$a = strtoupper("1337 1337 1337");
10echo "Outside of eval: $a\n"; 10echo "Outside of eval: $a\n";
11eval( 11eval(
12 "echo 'Inception lvl 1...\n'; 12 "echo 'Inception lvl 1...\n';
@@ -14,16 +14,16 @@ eval(
14 'echo \"Inception lvl 2...\n\"; 14 'echo \"Inception lvl 2...\n\";
15 eval( 15 eval(
16 \"echo \'Inception lvl 3...\n\'; 16 \"echo \'Inception lvl 3...\n\';
17 strlen(\'Limbo!\'); 17 strtoupper(\'Limbo!\');
18 \"); 18 \");
19 '); 19 ');
20"); 20");
21echo "After eval: $a\n"; 21echo "After eval: $a\n";
22?> 22?>
23--EXPECTF-- 23--EXPECTF--
24Outside of eval: 14 24Outside of eval: 1337 1337 1337
25Inception lvl 1... 25Inception lvl 1...
26Inception lvl 2... 26Inception lvl 2...
27Inception lvl 3... 27Inception lvl 3...
28 28
29Fatal error: [snuffleupagus][eval] A call to strlen was tried in eval, in %a/nested_eval_blacklist.php(5) : eval()'d code(4) : eval()'d code:3, dropping it. in %a/nested_eval_blacklist.php(5) : eval()'d code(4) : eval()'d code(4) : eval()'d code on line 3 \ No newline at end of file 29Fatal error: [snuffleupagus][eval] A call to strtoupper was tried in eval, in %a/nested_eval_blacklist.php(5) : eval()'d code(4) : eval()'d code:3, dropping it. in %a/nested_eval_blacklist.php(5) : eval()'d code(4) : eval()'d code(4) : eval()'d code on line 3