php-build
builds PHP versions from source for use with phpenv or standalone
TLDR
List available PHP versions
$ php-build --definitions
Install PHP version$ php-build [8.2.0] [~/.phpenv/versions/8.2.0]
Install with configure options$ PHP_BUILD_CONFIGURE_OPTS="--with-openssl" php-build [8.2.0] [/path/to/install]
Install specific version with debug$ php-build -v [8.2.0] [/path/to/install]
SYNOPSIS
php-build [options] version install-path
DESCRIPTION
php-build builds PHP versions from source for use with phpenv or standalone. It handles downloading, configuring, compiling, and installing multiple PHP versions.
PARAMETERS
--definitions
List available versions.-v
Verbose mode.-i file
Read custom definitions.--pear
Install PEAR.
List versions
php-build --definitions
Install PHP 8.2
php-build 8.2.0 ~/.phpenv/versions/8.2.0
With extensions
PHPBUILDCONFIGURE_OPTS="--with-curl --with-openssl" \
php-build 8.1.0 /opt/php-8.1.0
Install with verbose output
php-build -v 8.2.5 ~/.php/8.2.5
$
# ENVIRONMENT
PHPBUILDCONFIGURE_OPTS # Extra configure options# ENVIRONMENT
PHPBUILDEXTRAMAKEARGUMENTS # Extra make arguments
PHPBUILDROOT # Build directory
