library/Garp/Cli.php
public static function prompt($prompt = '', $trim = true) {
        $prompt && self::lineOut($prompt);
        self::lineOut('> ', null, false);
        $response = fgets(STDIN);

        if ($trim) {
            $response = trim($response);
        }
        return $response;
    }
public static function prompt($prompt = '', $trim = true) {
        $prompt && self::lineOut($prompt);
        self::lineOut('> ', null, false);
        $response = fgets(STDIN);

        if ($trim) {
            $response = trim($response);
        }
        return $response;
    }
public static function prompt ( $ prompt = '' , $ trim = true ) { $ prompt && self :: lineOut ( $ prompt ) ; self :: lineOut ( '> ' , null , false ) ; $ response = fgets ( STDIN ) ; if ( $ trim ) { $ response = trim ( $ response ) ; } return $ response ; }
Receive input from the commandline.

@param string $prompt Something to say to the user indicating your waiting for a response
@param bool $trim Wether to trim the response
@return string The user's response
Receive input from the commandline .