3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php /* $values['test']['radio'] = "foo']) OR die('RCE');"; $myVar = "['test']['radio']"; eval("\$x = (isset(\$values$myVar)) ? \$values$myVar : 'failed';"); print_r($x); */ $val = '"test"; echo "hacked code running";'; $val = '$cat)) "fake1" : "fake2"; echo "HACKS"; //'; eval("\$x = (isset($val)) ? $val : 'fail'");
based on NP7FU
Output for 7.0.30 - 7.3.0beta1
Parse error: syntax error, unexpected '"fake1"' (T_CONSTANT_ENCAPSED_STRING) in /in/Q163X(13) : eval()'d code on line 1
Process exited with code 255.
Output for hhvm-3.22.0
Fatal error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /in/Q163X(-1)(bc945dfabfea05196db35da551518f3b) : eval()'d code on line -1
Output for hhvm-3.18.5 - 3.21.3
Fatal error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /in/Q163X(13)(bc945dfabfea05196db35da551518f3b) : eval()'d code on line 1
Output for 5.6.30
Parse error: syntax error, unexpected '"fake1"' (T_CONSTANT_ENCAPSED_STRING) in /in/Q163X(13) : eval()'d code on line 1