3v4l.org

run code in 300+ PHP versions simultaneously
<?php function decode($encoded, $key) { $strofsym = "qwertyuiopasdfghjklzxcvbnm1234567890QWERTYUIOPASDFGHJKLZXCVBNM="; $x = 0; while ($x++ <= strlen($strofsym)) { $tmp = md5(md5($key.$strofsym[$x-1]).$key); $encoded = str_replace($tmp[3].$tmp[6].$tmp[1].$tmp[2], $strofsym[$x-1], $encoded); } return base64_decode($encoded); } echo decode('abc', 'abv');

preferences:
74.85 ms | 402 KiB | 5 Q