function TestFunction() { echo "Are you KP? (yes/no)"; $answer = \Seld\CliPrompt\CliPrompt::prompt(); if ($answer == "yes") { echo "Happy birthday!\n"; } else { echo "Screw you :)\n"; } }
/** * {@inheritDoc} */ public function askAndHideAnswer($question) { $this->writeError($question, false); return \Seld\CliPrompt\CliPrompt::hiddenPrompt(true); }
/** * Read the line, but hide what the user is typing * * @return string */ public function hidden() { return CliPrompt::hiddenPrompt(); }