summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Weinand <bobwei9@hotmail.com>2015-03-21 22:40:44 +0100
committerBob Weinand <bobwei9@hotmail.com>2015-03-21 23:16:53 +0100
commit2ed008583309e07cb11dbf14de919b21bd68ef16 (patch)
tree1a40b10c801cea03e0b8f7fe756eb69ba375cddf
parent97887e37168c73fb028a4b58bf59010e6217ef7b (diff)
downloadphp-git-2ed008583309e07cb11dbf14de919b21bd68ef16.tar.gz
Add phpdbg -h for help
-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);