<?php
$stdin = fopen(, );
$allowed = array(1 => 'fee fie', 'huff and puff', 'mirror mirror', 'tick tock');

for(;;) {
    foreach ($allowed as $id => $name) {
        echo ;
    }
    echo ;
    $stdin_string = fgets($stdin, 4096);
    if (isset($allowed[(int) $stdin_string])) {
        echo ;
        break;
    }
}