]> granicus.if.org Git - php/commitdiff
Add the `-V` option to print the version number.
authorIvan Enderlin <ivan.enderlin@hoa-project.net>
Wed, 18 Dec 2013 14:12:28 +0000 (15:12 +0100)
committerIvan Enderlin <ivan.enderlin@hoa-project.net>
Wed, 18 Dec 2013 15:05:11 +0000 (16:05 +0100)
phpdbg.c
phpdbg_help.c

index ba40b15d71d6810cb6d9dbed145fd15358828673..12432a554b41987c9475a39b71e6003b06e58efa 100644 (file)
--- a/phpdbg.c
+++ b/phpdbg.c
@@ -566,6 +566,7 @@ const opt_struct OPTIONS[] = { /* {{{ */
        {'l', 1, "listen"},
        {'a', 1, "address-or-any"},
 #endif
+       {'V', 0, "version"},
        {'-', 0, NULL}
 }; /* }}} */
 
@@ -998,6 +999,18 @@ phpdbg_main:
                                } else address = strdup(php_optarg);
                        } break;
 #endif
+
+                       case 'V': {
+                               printf(
+                                       "phpdbg %s (built: %s %s)\nCopyright (c) 2013 %s\nPHP %s, Copyright (c) 1997-2013 The PHP Group\n",
+                                       PHPDBG_VERSION,
+                                       __DATE__,
+                                       __TIME__,
+                                       PHPDBG_AUTHORS,
+                                       PHP_VERSION
+                               );
+                               return 0;
+                       } break;
                }
        }
 
index fb2e9b71f35e93cd6f84632c65c932cdd2991abe..61a62f15fbd621a15f94d3375209afcfd8365e6c 100644 (file)
@@ -589,6 +589,7 @@ PHPDBG_HELP(options) /* {{{ */
        phpdbg_writeln(" -l\t-l4000\t\t\tSetup remote console ports");
        phpdbg_writeln(" -a\t-a192.168.0.3\t\tSetup remote console bind address");
 #endif
+       phpdbg_writeln(" -V\tN/A\t\t\tVersion number");
        phpdbg_notice("Passing -rr will quit automatically after execution");
 #ifndef _WIN32
        phpdbg_writeln("Remote Console Mode");