From 2ed008583309e07cb11dbf14de919b21bd68ef16 Mon Sep 17 00:00:00 2001 From: Bob Weinand Date: Sat, 21 Mar 2015 22:40:44 +0100 Subject: [PATCH] Add phpdbg -h for help --- sapi/phpdbg/phpdbg.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c index 3d5874df7e..d9d61a8a73 100644 --- a/sapi/phpdbg/phpdbg.c +++ b/sapi/phpdbg/phpdbg.c @@ -761,6 +761,7 @@ const opt_struct OPTIONS[] = { /* {{{ */ {'a', 1, "address-or-any"}, #endif {'x', 0, "xml output"}, + {'h', 0, "help"}, {'V', 0, "version"}, {'-', 0, NULL} }; /* }}} */ @@ -1202,6 +1203,18 @@ phpdbg_main: flags |= PHPDBG_WRITE_XML; break; + + case 'h': { + sapi_startup(phpdbg); + phpdbg->startup(phpdbg); + PHPDBG_G(flags) = 0; + phpdbg_set_prompt(PHPDBG_DEFAULT_PROMPT); + phpdbg_do_help(NULL); + sapi_deactivate(); + sapi_shutdown(); + return 0; + } break; + case 'V': { sapi_startup(phpdbg); phpdbg->startup(phpdbg); -- 2.40.0