3v4l.org

run code in 300+ PHP versions simultaneously
<?php $o = ""; $allowed_chars = array_fill_keys(range('A-Za-z0-9'), "a"); $string = "hzgtfrzutrdetzttedcuztivcretfuzrtzt"; for ($i = 0; $i < strlen($string); $i++) { $ch = $string[$i]; if (isset($allowed_chars[ord($ch)])) { $o.=$allowed_chars[ord($ch)]; } else if (ord($ch) == 27) { $i++; $ch = $string[$i]; if (isset($escape_char[ord($ch)])) { $o.=$escape_char[ord($ch)]; } } } echo $o;

preferences:
45.74 ms | 402 KiB | 5 Q