[php-src] PR #19328: Expose os, compiler, arch in `php -v`
| From: | arnaud-lb | Date: | Thu, 31 Jul 2025 09:53:36 +0000 |
| Subject: | [php-src] PR #19328: Expose os, compiler, arch in `php -v` | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-32727@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/19328
Author: arnaud-lb
See https://github.com/php/php-src/issues/19256
The bug system requires the output of
php -v when reporting bugs. Exposing more
information in php -v can be useful.
PHP_BUILD_COMPILER and PHP_BUILD_ARCH are always defined in Windows build,
or when defined in the environment during the build (https://github.com/php/php-src/pull/5834). In
other cases I determine these from compiler macros.
Output examples:
```
PHP 8.5.0-dev (cli) (built: Jul 31 2025 11:18:32) (NTS DEBUG x86_64) (Linux 6.15.8-200.fc42.x86_64
Clang 20.1.8 (Fedora 20.1.8-1.fc42))
Copyright (c) The PHP Group
Zend Engine v4.5.0-dev, Copyright (c) Zend Technologies
with Zend OPcache v8.5.0-dev, Copyright (c), by Zend Technologies
```
```
PHP 8.5.0-dev (cli) (built: Jul 31 2025 11:29:06) (ZTS DEBUG x64) (Windows NT 10.0 Visual C++ 2022)
Copyright (c) The PHP Group
Zend Engine v4.5.0-dev, Copyright (c) Zend Technologies
with Zend OPcache v8.5.0-dev, Copyright (c), by Zend Technologies
```