diff options
author | Bob Weinand <bobwei9@hotmail.com> | 2015-03-21 22:40:44 +0100 |
---|---|---|
committer | Bob Weinand <bobwei9@hotmail.com> | 2015-03-21 23:16:53 +0100 |
commit | 2ed008583309e07cb11dbf14de919b21bd68ef16 (patch) | |
tree | 1a40b10c801cea03e0b8f7fe756eb69ba375cddf | |
parent | 97887e37168c73fb028a4b58bf59010e6217ef7b (diff) | |
download | php-git-2ed008583309e07cb11dbf14de919b21bd68ef16.tar.gz |
Add phpdbg -h for help
-rw-r--r-- | sapi/phpdbg/phpdbg.c | 13 |
1 files changed, 13 insertions, 0 deletions
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); |