protected final function prompt($text) { static $fp = null; if ($fp === null) { $fp = \fopen('php://stdin', 'r'); } echo $text; return Binary::safeSubstr(\fgets($fp), 0, -1); }