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 Q163X
Output for 7.0.30 - 7.3.0beta1
Parse error: syntax error, unexpected '$cat' (T_VARIABLE), expecting identifier (T_STRING) in /in/T10JB(13) : eval()'d code on line 1
Process exited with code 255.
Output for hhvm-3.22.0
Fatal error: syntax error, unexpected T_VARIABLE in /in/T10JB(-1)(d7adfea5f4344dd6b0c2d37f34c6df0e) : eval()'d code on line -1
Output for hhvm-3.18.5 - 3.21.3
Fatal error: syntax error, unexpected T_VARIABLE in /in/T10JB(13)(d7adfea5f4344dd6b0c2d37f34c6df0e) : eval()'d code on line 1
Output for 5.6.30
Parse error: syntax error, unexpected '$cat' (T_VARIABLE), expecting identifier (T_STRING) in /in/T10JB(13) : eval()'d code on line 1