_getch(); } public function ungetch(string $char) { return self::$ffi->_ungetch($char[0]); } public function ungetchString(string $string): bool { $stringReverse = \strrev($string); $result = false; foreach(\str_split($stringReverse) as $char) { $result = self::$ffi->_ungetch($char) > 0; if(!$result) { return false; } } return $result; } }