#!/usr/bin/env php setTagline('test console prompting'); $args->setSynopsis(<<parseStandardArguments(); $args->parse( array( array( 'name' => 'history', 'param' => 'file', 'default' => '', 'help' => 'Use specified history __file__.', ), array( 'name' => 'prompt', 'param' => 'text', 'default' => 'Enter some text:', 'help' => 'Change the prompt text to __text__.', ), )); $result = phutil_console_prompt( $args->getArg('prompt'), $args->getArg('history')); $console = PhutilConsole::getConsole(); $console->writeOut("Input is: %s\n", $result);