php-src/sapi/cgi
Calvin Buckley afc5738154
Show build provider and unify version information printing (#14657)
* Show build provider information in "php -v"

Vendors such as distributions can set the `PHP_BUILD_PROVIDER`
variable, that gets printed in phpinfo. However, I find that users check
`php -v` more often than phpinfo to see what PHP they're running. The
problem with this is that it does not show that build provider
information.

This change makes the build provider information printed on an
additional line of the version information.

* Put on same line so it works with or without env var

Unbreaks build without PHP_BUILD_PROVIDER set.

* change wording in provider version text

better grammatically; many different possibilities here though

* Unify SAPI version printing

This makes it so that all of the SAPIs share the same code for printing
version information. This is useful in case of any future changes to the
version information, such as i.e. adding build provider to the output.

* Make include for php_print_version explicit

* Preserve phpdbg version and output channel

php_printf doesn't have same semantics, as phpdbg_out could be on a
different output than stdout/err. Also add the phpdbg version (in case
it differs from PHP's, to keep similar output before this PR)

* remove size variables

we don't use them and CI doesn't like unused variables

* Fix format string insecurity
2024-08-12 23:24:41 -03:00
..
tests Show build provider and unify version information printing (#14657) 2024-08-12 23:24:41 -03:00
cgi_main_arginfo.h Implement "support doc comments for internal classes and functions" (#13266) 2024-02-25 08:41:31 +01:00
cgi_main.c Show build provider and unify version information printing (#14657) 2024-08-12 23:24:41 -03:00
cgi_main.stub.php Enable class entry generation for sapi extensions 2021-02-14 12:03:48 +01:00
config9.m4 Replace PHP_OUTPUT with AC_CONFIG_FILES (#15186) 2024-08-03 21:52:14 +02:00
config.w32 Remove unused Git attributes ident 2018-07-25 00:53:25 +02:00
CREDITS
Makefile.frag Sync leading and final newlines in source code files 2018-10-14 12:56:38 +02:00
php-cgi.1.in Fixed Bug #65143 Missing php-cgi man page 2013-07-02 10:42:47 +02:00