run code in 150+ php & hhvm versions
Bugs & Features
<?php $msg = 'This is a test'; $key = 'magic_key'; // print, and make unprintable chars available for a link or alike. // using $_GET, php will urldecode it, if it was passed urlencoded print "obfuscated, ready for url: " . urlencode(obfuscate($msg, $key)) . "\n"; print "deObfuscated: " . obfuscate(obfuscate($msg, $key), $key); function obfuscate($msg, $key) { if (empty($key)) return $msg; return $msg ^ str_pad('', strlen($msg), $key); } ?>
based on 6NqXo
Output for 4.3.0 - 5.6.21, hhvm-3.12.0, 7.0.0 - 7.1.0RC3
obfuscated, ready for url: 9%09%0E%1AC6%18E%18M%15%02%1A%17 deObfuscated: This is a test
Output for hhvm-3.10.0

Process exited with code 153.