summaryrefslogtreecommitdiff
path: root/phpdbg.c
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2013-12-18 15:12:28 +0100
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2013-12-18 16:05:11 +0100
commitabf68be7a46c53ecc40c2388c7913bf9d2a7da9d (patch)
tree82077062c37849dca35abdd580f473b9d5429b84 /phpdbg.c
parent7e0d1938f9e875a96284c217f28a2e7a1995539d (diff)
downloadphp-git-abf68be7a46c53ecc40c2388c7913bf9d2a7da9d.tar.gz
Add the `-V` option to print the version number.
Diffstat (limited to 'phpdbg.c')
-rw-r--r--phpdbg.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/phpdbg.c b/phpdbg.c
index ba40b15d71..12432a554b 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;
}
}