3v4l.org

run code in 300+ PHP versions simultaneously
<?php function encrypt($plain) { $plain = md5($plain); $V = md5('??????'); //var_dump($V); $rnd = md5(substr(microtime(),11));// hao miao //var_dump(substr(microtime(),11)+mt_rand(0,35)); $cipher = ''; for($i = 0; $i < strlen($plain); $i++) { //32ci $cipher .= ($plain[$i] ^ $rnd[$i]); echo $cipher; } $cipher .= $rnd; echo $cipher; $V .= strrev($V); echo $V; //var_dump($cipher); for($i = 0; $i < strlen($V); $i++) { $cipher[$i] = ($cipher[$i] ^ $V[$i]); } //var_dump($cipher); //var_dump($V); return str_replace('=', '', base64_encode($cipher)); } encrypt('sb') ?>

preferences:
16.8 ms | 402 KiB | 5 Q