PHP 7.2 reached EOL on , and all releases of this version no longer receive security or bug fixes. Using PHP 7.2.2 is not recommended. PHP 7.2.34 is the latest version in the series.
Downloads
Source Code
Git Clone
Use Git to clone the 7.2.2 tag from the PHP Git repository.
git clone https://github.com/php/php-src.git --depth 1 --branch php-7.2.2
How to compile PHP
PHP can be compiled by setting up the dependencies, building the configure script (
Detailed articles on how to compile PHP are available for Ubuntu/Debian based systems and Fedora/RHEL based systems.
./buildconf
), configuring the build ./configure
, and running make
.Detailed articles on how to compile PHP are available for Ubuntu/Debian based systems and Fedora/RHEL based systems.
Windows binaries
Non-Thread Safe Builds
Non-Thread Safe (NTS) builds are single-threaded PHP builds. They can be used on web servers that integrate PHP over FastCGI protocol, such as Nginx, Caddy, and IIS.
php-7.2.2-x64NTS.zip (24.42 MiB)
php-7.2.2-x86NTS.zip (22.76 MiB)
Thread-Safe Builds
Thread-Safe (TS) builds are multi-thread PHP builds, often used to integrate PHP as a Server API for multithreaded servers. The most common use case is using PHP as an Apache module.
php-7.2.2-x64TS.zip (24.56 MiB)
php-7.2.2-x86TS.zip (22.83 MiB)
Docker/Podman Containers
PHP CLI
PHP CLI Containers images only include the PHP CLI, and no FPM or Apache modules. The Alpine builds are lightweight, but may introduce incompatibilities due to their musl builds. Albeit their larger size, the Debian-based (without the "-alpine" suffix) images are more complete, and widely used.
Alpine-based: Lightweight, but may introduce incompatibilities due to their musl builds.
docker pull php:7.2.2-cli-alpine
Debian-based: More compatible with other components, complete, and are widely used.
docker pull php:7.2.2-cli
PHP CLI + Web Server Integration
These container images include PHP CLI, and a web server integration. FPM container images can be integrated with web servers such as Nginx, Caddy, and Apache with Event MPM. The Apache container images include Apache web server, integrating PHP as an Apache module.
Alpine-based: Lightweight, but may introduce incompatibilities due to their musl builds.
docker pull php:7.2.2-fpm-alpine
Debian-based ZTS Apache: Includes Apache web server integrating PHP as an Apache module.
docker pull php:7.2.2-apache
Debian-based NTS FPM: PHP-FPM, can be integrated with Nginx, Caddy, and other web servers over Fast CGI.
docker pull php:7.2.2-fpm
ChangeLog
Core
- Fixed bug #75742 (potential memleak in internal classes's static members).
- Fixed bug #75679 (Path 260 character problem).
- Fixed bug #75614 (Some non-portable == in shell scripts).
- Fixed bug #75786 (segfault when using spread operator on generator passed by reference).
- Fixed bug #75799 (arg of get_defined_functions is optional).
- Fixed bug #75396 (Exit inside generator finally results in fatal error).
FCGI
- Fixed bug #75794 (
getenv()
crashes on Windows 7.2.1 when second parameter is false).
IMAP
- Fixed bug #75774 (imap_append HeapCorruction).
Opcache
- Fixed bug #75720 (File cache not populated after SHM runs full).
- Fixed bug #75687 (var 8 (TMP) has array key type but not value type).
- Fixed bug #75698 (Using @ crashes php7.2-fpm).
- Fixed bug #75579 (Interned strings buffer overflow may cause crash).
PDO
- Fixed bug #75616 (PDO extension doesn't allow to be built shared on Darwin).
PDO MySQL
- Fixed bug #75615 (PDO Mysql module can't be built as module).
PGSQL
- Fixed bug #75671 (
pg_version()
crashes when called on a connection to cockroach).
Readline
- Fixed bug #75775 (readline_read_history segfaults with empty file).
SAPI
- Fixed bug #75735 ([embed SAPI] Segmentation fault in sapi_register_post_entry).
SOAP
- Fixed bug #70469 (SoapClient generates E_ERROR even if exceptions=1 is used).
- Fixed bug #75502 (Segmentation fault in
zend_string_release
).
SPL
- Fixed bug #75717 (RecursiveArrayIterator does not traverse arrays by reference).
- Fixed bug #75242 (RecursiveArrayIterator doesn't have constants from parent class).
- Fixed bug #73209 (RecursiveArrayIterator does not iterate object properties).
Standard
- Fixed bug #75781 (substr_count incorrect result).
- Fixed bug #75653 (
array_values
don't work on empty array).
Zip
- Display headers (buildtime) and library (runtime) versions in phpinfo (with libzip >= 1.3.1).
Commit List
Anatol Belski
- Fixed bug #75679 Path 260 character problem in 4c0af1fbd4
- Fixed bug #75671
pg_version()
crashes when called on a connection to cockroach in acf1472ffd - Templatize driver name in the expected string in c2308d5d7c
- Update libmagic.patch in 9408f1efa7
- Ensure expected items delivered in same order in cc5a0da006
- pdo_odbc has no driver API for quoting, skip the test in d7cc1ce58f
- Fix wrong return value for fail case in set attribute handler in pdo_odbc in 77b0e2fd3f
- Switch AppVeyor to PostgreSQL 10 for tests in 620b9b369d
- Update tool path in 7b47b7297d
- Revert to Postgres 9.6, AppVeyor seems to have issues with 10 in 9cafc33ba3
- Fix test for pdo_odbc in 1a9d09784e
- Skip test for pdo_odbc in 463fd04758
- Extend skip section in 2508d5051f
- Skip on Travis-CI in 904e0d7212
- Fix tests in 1448f0912f
- Fix test for libtidy 5.6.0 in 83a77383b9
- Extend test, latest cURL ships also with smb and smbs in 4bb46c133d
- Unify EOL in 9d2662ea4b
- Fixed bug #75774 imap_append HeapCorruction in cecf734dc3
- Fix invalid free in 2503a27ae0
- Sync for upcoming vc++ 15.6 version raise in 089a3213ae
- Allow pecl like usage in
ext/phar
, closes #2955 in 2d4fb56c1d
Anton Artamonov
- Fixed bug #70469 in 0246373788
Christoph M. Becker
- Fixed bug #75571: Potential infinite loop in gdImageCreateFromGifCtx in 8d6e958867
Danilo Correa
- Set default value for some properties in generate-phpt in 8c36588ee8
David Carlier
- Move includes in
ps_title.c
in 14393b5fb3
Dmitry Stogov
- Fixed bug #75579 (Interned strings buffer overflow may cause crash) in 37bf8bdc14
- Fixed bug #75579 (Interned strings buffer overflow may cause crash) in da61c7a2a4
- Fixed reference-counting in 7c96e974d9
- Fixed bug #75720 (File cache not populated after SHM runs full) in 60b2d67828
- Fixed possible incorrect "mark" usage in cfee682802
Evgeny Kalashnikov
- Fix segfault. Compile param
--with-tsrm-pth
=yes in a46f952c0f
Ferenc Kovacs
- php 5.6.34 is next in 028507f1f6
Gabriel Caruso
- Fixed bug #75799 (arg of get_defined_functions is optional) in a843a86e6f
Jakub Zelenka
- Use seialize_precision instead of precision in all json tests in 2fd0b994dd
Jaromír Doleček
- Fix bug #75615 in 200bf9b5d7
- Fixed bug #75616 in 11eed9f3ba
Jelle van der Waa
- Fix bug #69727: Support SOURCE_DATE_EPOCH for Build Date in 8a179fa02b
Levi Morrison
- Fix copy-and-paste bugs in 580bae4a2c
Lior Kaplan
- Happy new year (Update copyright to 2018) in fbfdd1e1c4
- Happy new year (Update copyright to 2018) in fc528afd2b
Nikita Popov
- Improve fix for bug #75687 in 8a4532319d
- Add test for bug #75681 in 19d0c5dc9f
- Fixed bug #75698 in ee45104dba
- Fixed bug #75614 in 340255a694
- Document removal of opcache.fast_shutdown in a1d2bf831f
- Fixed bug #75717 in ccb113c3e5
- Fixed bug #75242 in ec142f2c86
- Fixed bug #73209 in f14b6f4920
- Fixed bug #75502 in d534d59bd8
- Backport narrowing fix to 7.1 in f208187773
- Fixed bug #75786 in fd30c59e04
- Revert "Fixed bug #75287 (Builtin webserver crash after chdir in a shutdown function)" in 9e98e99a3a
- Fixed bug #75653 in 8c73fc8027
- Fixed bug #75396 in 420d11e8ca
- Try to fix yield from GC issues in cab0a814bd
- Fix generator GC if yield from parent chain does not reach root in 8c07170ddb
- Fixed bug #75079 in 2023346973
Pedro Magalhães
- Fix #75607 - Check if existing static trait property is a ref before comparing in 83964e0468
Remi Collet
- display headers (buildtime) and library (runtime) versions in phpinfo (libzip >= 1.3.1) in c21ec44b21
- NEWS in ac4da9a0ed
- 2018 in 1aa8e42036
- missing changelog entries in d6e4132ca6
- missing changelog entries + fix version and date in 421787db6b
- 2018 in 67ec3ce1ec
- fix NEWS file in e620cfbef0
- clean NEWS in 2d922837b3
- Update versions for PHP 7.2.2 in d4876e2691
Riccardo Magliocchetti
- fileinfo: fix misleading indentation in libmagic in e313daa598
Sara Golemon
- Prep NEWS for PHP 7.2.2 in 4cbc1f7e0d
Stanislav Malyshev
- Fix bug #74782: remove file name from output to avoid XSS in 73ca9b3773
- Update NEWS in 2881199c80
- Fix some int/long confusion issues in GMP in c0f0a0a862
Xinchen Hui
- Fixed bug #75687 (var 8 (TMP) has array key type but not value type) in a20c9bd3fe
- Updated NEWS in a3b5b93ba9
- Fixed bug #75735 ([embed SAPI] Segmentation fault in sapi_register_post_entry) in dc3822c343
- Updated NEWS in 14304faae2
- Fixed bug #75742 (potential memleak in internal classes's static members) in 650264e360
- year++ in ccd4716ec7
- year++ in 7a7ec01a49
- regenerated with newer re2c in b65abecfdf
- Fixed bug #75781 (substr_count incorrect result) in 6da44fefb2
- Update NEWS in 0a1f52fb09