com php-src: Add the `-V` option to print the version number.: phpdbg.c phpdbg_help.c

From: Date: Wed, 18 Dec 2013 15:05:11 +0000
Subject: com php-src: Add the `-V` option to print the version number.: phpdbg.c phpdbg_help.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-75249@lists.php.net to get a copy of this message
Commit: abf68be7a46c53ecc40c2388c7913bf9d2a7da9d Author: Ivan Enderlin <ivan.enderlin@hoa-project.net> Wed, 18 Dec 2013 15:12:28 +0100 Parents: 7e0d1938f9e875a96284c217f28a2e7a1995539d Branches: PHP-5.6 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=abf68be7a46c53ecc40c2388c7913bf9d2a7da9d Log: Add the -V option to print the version number. Changed paths: M phpdbg.c M phpdbg_help.c Diff: diff --git a/phpdbg.c b/phpdbg.c index ba40b15..12432a5 100644 --- 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; } } diff --git a/phpdbg_help.c b/phpdbg_help.c index fb2e9b7..61a62f1 100644 --- a/phpdbg_help.c +++ b/phpdbg_help.c @@ -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");

« previous php.cvs (#75249) next »