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) { echo "s: " .$s. "\r\n"; $a = $s^192; echo "a: " .$a . "\r\n"; $decStr .= chr($a); echo "chr: " .$decStr . "\r\n\r\n"; } return $decStr."\r\n\r\n"; } return false; } return false; } echo decrypt("MTI5MTY0MTczMTY5MTc0"); echo decrypt("MTQ4MTY4MTY1MTMxMTc1MTgz"); ?>
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
s: 129 a: 65 chr: A s: 164 a: 100 chr: Ad s: 173 a: 109 chr: Adm s: 169 a: 105 chr: Admi s: 174 a: 110 chr: Admin Admin s: 148 a: 84 chr: T s: 168 a: 104 chr: Th s: 165 a: 101 chr: The s: 131 a: 67 chr: TheC s: 175 a: 111 chr: TheCo s: 183 a: 119 chr: TheCow TheCow