function runNommlang($input) {
$canPrint = false;
$charIndex = 0;
for($i = 0; $i < strlen($input); $i++) {
switch (strtolower(substr($input, $i, 1))) {
case "n": {
echo "\n";
break;}
case "o": {
$canPrint = true;
break;}
case "m": {
$charIndex++;
break;}
case " ": {
if ($canPrint == true) {
echo chr(64 + $charIndex);
$charIndex = 0;
}
break;}
}
}
}
Comments