3v4l.org

run code in 300+ PHP versions simultaneously
<?php <?php $mustget = 'Kw4SCQ=='; $string = 'Josh'; echo("Must get: " . $mustget . "\n"); echo("We got: " . base64_encode(xor_this($string)) . "\n"); function xor_this($text) { $key = 'frtkj'; $i = 0; $encrypted = ''; foreach (str_split($text) as $char) { $encrypted .= $char ^ $key{$i++ % strlen($key)}; } return $encrypted; } ?>
Output for 5.3.0 - 5.3.19, 5.4.0 - 5.4.9
Parse error: syntax error, unexpected '<' in /in/AWpkf on line 3
Process exited with code 255.

preferences:
173.71 ms | 1395 KiB | 33 Q