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"); ?> <?php function encrypt($str) { if(preg_match('%[a-zA-Z0-9/+]*={0,2}$%',$str)) { $str=base64_encode($str); if($str != "" && $str != null && $str != false) { $encStr=""; foreach($array as $s) { $a=$s^64; $encStr .=chr('MT'); $encStr .=chr($s); } return $encStr; } return false; } return false; } echo encrypt("Admin"); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Admin Warning: Undefined variable $array in /in/O9sFr on line 42 Warning: foreach() argument must be of type array|object, null given in /in/O9sFr on line 42

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:
35.77 ms | 401 KiB | 8 Q