summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg.c
diff options
context:
space:
mode:
Diffstat (limited to 'sapi/phpdbg/phpdbg.c')
-rw-r--r--sapi/phpdbg/phpdbg.c13
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);