3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* string encryptDecrypt(string toEncrypt) { char key[3] = {'K', 'C', 'Q'}; //Any chars will work string output = toEncrypt; for (int i = 0; i < toEncrypt.size(); i++) output[i] = toEncrypt[i] ^ key[i % (sizeof(key) / sizeof(char))]; return output; } function XoR($string) { $Key = ('K', 'C', 'Q'); $Text = "kylewbanks.com"; for($i=0;$i<strlen($Text);) { } } */ function xor_this($text) { $key = pack('K', 'C', 'Q'); $i = 0; $encrypted = ''; foreach (str_split($text) as $char) { $encrypted .= chr(ord($char) ^ ord($key{$i++ % strlen($key)})); } return $encrypted; } $text = 'kylewbanks.com'; print xor_this($text); ?>
Output for git.master, git.master_jit
Fatal error: Array and string offset access syntax with curly braces is no longer supported in /in/anAUn on line 30
Process exited with code 255.
Output for rfc.property-hooks
Parse error: syntax error, unexpected token "{", expecting ")" in /in/anAUn on line 30
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
52.88 ms | 401 KiB | 8 Q