Php-config
Php-config is a simple command-line script to get information about the installed PHP configuration.
When compiling extensions, if you have multiple versions of PHP installed, you can use the --with-php-config option at configuration time to specify which version to compile with, which specifies the path to the corresponding Php-config script.
The options that the Php-config script can use on the command line can be displayed with the- h option:
Usage:/usr/local/bin/php-config [option]options: --prefix [...] --includes [...] --ldflags [...] --libs [...] --extension-dir [...] --include-dir [...] --php-binary [...] --php-sapis [...] --configure-options [...] --version [...] --vernum [...]
Command-Line Options
Options |
Description |
--prefix |
Path prefixes installed by PHP, such as/usr/local |
--includes |
List all files included with-i option |
--ldflags |
The LD flag used by PHP at compile time |
--libs |
Libraries that are attached to PHP at compile time |
--extension-dir |
Default path for extension libraries |
--include-dir |
Default path prefix for header files |
--php-binary |
Full path to the PHP CLI or CGI executable file |
--php-sapis |
List all available SAPI modules |
--configure-options |
Reproduce the current PHP configuration options at compile time |
--version |
PHP Version number |
--vernum |
The PHP version number, expressed as an integer |
Php-config Introduction