text = "Do you want to proceed?"; $opts->showResults = true; $opts->validator = new ezcConsoleQuestionDialogCollectionValidator( array( "y", "n" ), "n", ezcConsoleQuestionDialogCollectionValidator::CONVERT_LOWER ); $dialog = new ezcConsoleQuestionDialog( $out, $opts ); echo "The user decided to " . ( ezcConsoleDialogViewer::displayDialog( $dialog ) === "n" ? "not " : "" ) . "proceed.\n"; ?>