3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $srch = "{${eval("echo phpinfo();echo 'apple1(?=/)'\e")}}"; echo $srch; echo "\n"; $search = htmlentities($srch); echo $search; echo "\n"; if (strpos($search, 'apple') !== false){ echo "in the if!"; echo "\n"; echo preg_replace("/".$search."/", $search." <img src='".$search.".png'>", "apple"); }
Output for 7.0.0 - 7.1.0
Warning: Unexpected character in input: '' (ASCII=27) state=0 in /in/Z8vmT(2) : eval()'d code on line 1 Parse error: syntax error, unexpected end of file, expecting ',' or ';' in /in/Z8vmT(2) : eval()'d code on line 1
Process exited with code 255.
Output for hhvm-3.10.0 - 3.12.0
Fatal error: Unexpected character in input: '' (ASCII=27) (Line: 1, Char: 39) syntax error, unexpected $end, expecting ',' or ';' in /in/Z8vmT(2)(54a8376bb40fd2f7932706c849bed33b) : eval()'d code on line 1 Notice: Undefined variable: in /in/Z8vmT on line 2
Output for 5.4.11 - 5.6.28
Warning: Unexpected character in input: '' (ASCII=27) state=0 in /in/Z8vmT(2) : eval()'d code on line 1 Parse error: syntax error, unexpected end of file, expecting ',' or ';' in /in/Z8vmT(2) : eval()'d code on line 1 Notice: Undefined variable: in /in/Z8vmT on line 2
Output for 5.4.0 - 5.4.10
Warning: Unexpected character in input: '' (ASCII=27) state=0 in /in/Z8vmT(2) : eval()'d code on line 1 Parse error: syntax error, unexpected end of file, expecting ',' or ';' in /in/Z8vmT(2) : eval()'d code on line 1 Notice: Undefined variable: in /in/Z8vmT on line 2
Process exited with code 255.
Output for 5.3.0 - 5.3.29
Parse error: syntax error, unexpected T_NS_SEPARATOR, expecting ',' or ';' in /in/Z8vmT(2) : eval()'d code on line 1 Notice: Undefined variable: in /in/Z8vmT on line 2
Process exited with code 255.
Output for 5.1.0 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/Z8vmT(2) : eval()'d code on line 1 Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /in/Z8vmT(2) : eval()'d code on line 1 Notice: Undefined variable: in /in/Z8vmT on line 2
Process exited with code 255.
Output for 5.0.4 - 5.0.5
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/Z8vmT(2) : eval()'d code on line 1 Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in /in/Z8vmT(2) : eval()'d code on line 1 Notice: Undefined variable: in /in/Z8vmT on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.3
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/Z8vmT(2) : eval()'d code on line 1 Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in /in/Z8vmT(2) : eval()'d code on line 1 Notice: Undefined variable: in /in/Z8vmT on line 2
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/Z8vmT(2) : eval()'d code on line 1 Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /in/Z8vmT(2) : eval()'d code on line 1 Notice: Undefined variable: in /in/Z8vmT on line 2
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/Z8vmT(2) : eval()'d code on line 1 Parse error: parse error, expecting `','' or `';'' in /in/Z8vmT(2) : eval()'d code on line 1 Notice: Undefined variable: in /in/Z8vmT on line 2
Process exited with code 255.