* Opens a file * * @author Art <*****@*****.**> * * @param string $path File path */ static function open_file($path) { shell_exec('start ' . $path); } /** * Reads a line of user input * * @author Art <*****@*****.**> * * @param string $prompt Prompt message * * @return string */ static function readline($prompt = null) { if ($prompt) { echo '[' . date('Y-m-d H:i:s') . '] ' . $prompt . ': '; } $r = trim(strtolower(stream_get_line(STDIN, PHP_INT_MAX, PHP_EOL))); echo PHP_EOL; return $r; } } IO::$argv = $_SERVER['argv']; array_shift(IO::$argv);