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' and user='admin' #")); ?>
Output for 4.3.0 - 7.1.0RC5
MTI5MTY0MTczMTY5MTc0MjMxMjI0MTYxMTc0MTY0MjI0MTgxMTc5MTY1MTc4MjUzMjMxMTYxMTY0MTczMTY5MTc0MjMxMjI0MjI3