]> granicus.if.org Git - php/commitdiff
Add phpdbg -h for help
authorBob Weinand <bobwei9@hotmail.com>
Sat, 21 Mar 2015 21:40:44 +0000 (22:40 +0100)
committerBob Weinand <bobwei9@hotmail.com>
Sat, 21 Mar 2015 22:16:53 +0000 (23:16 +0100)
sapi/phpdbg/phpdbg.c

index 3d5874df7eb62f0822434f966dcb8e8616e04d11..d9d61a8a7369602cd45c39cda9069fc5d5a6edcc 100644 (file)
@@ -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);