3v4l.org

run code in 300+ PHP versions simultaneously
<?php <?php function getCharacter($index) { $chars = "0123456789ABCDEFGHIJKLMOPQRSTUVWabcdefghijklmnopqrstuvw"; $c = ord(substr($chars, $index % strlen($chars))); return ord(substr($chars, ($index << $c) % strlen($chars))); } function main() { $array = array(176, 52, 608, 855); foreach ($array as $value) { echo "$value: " . getCharacter($value) . "\n"; } } main();
Output for 5.3.0 - 5.3.27, 5.4.0 - 5.4.20
Parse error: syntax error, unexpected '<' in /in/gfND1 on line 2
Process exited with code 255.

preferences:
177.89 ms | 1395 KiB | 56 Q