Skip to content

Show build provider and unify version information printing #14657

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion sapi/cli/php_cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ static int do_cli(int argc, char **argv) /* {{{ */
goto out;

case 'v': /* show php version & quit */
php_printf("PHP %s (%s) (built: %s %s) (%s)\nCopyright (c) The PHP Group\n%s",
php_printf("PHP %s (%s) (built: %s %s) (%s)\nCopyright (c) The PHP Group\n%s%s",
PHP_VERSION, cli_sapi_module.name, __DATE__, __TIME__,
#ifdef ZTS
"ZTS"
Expand All @@ -643,6 +643,12 @@ static int do_cli(int argc, char **argv) /* {{{ */
#endif
#ifdef HAVE_GCOV
" GCOV"
#endif
,
#ifdef PHP_BUILD_PROVIDER
"This build by " PHP_BUILD_PROVIDER "\n"
#else
""
#endif
,
get_zend_version()
Expand Down
2 changes: 1 addition & 1 deletion sapi/cli/tests/001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ echo "Done\n";
--EXPECTF--
string(%d) "PHP %s (cli) (built: %s)%s
Copyright (c) The PHP Group
Zend Engine v%s, Copyright (c) Zend Technologies
%AZend Engine v%s, Copyright (c) Zend Technologies
"
Done
Loading