PHP 8.5.8: Downloads, Changelog, News

Release Information

Release
8.5.8
PHP Version
PHP 8.5
Release Date
Release Type
Bug Fix Release
Release Status
Latest
Branch Status
Supported (Latest)

Latest PHP release in the latest version.
PHP 8.5 continues to receive bug fixes and security fixes until 2027-12-31.

Downloads

Source Code

Git Clone
Use Git to clone the 8.5.8 tag from the PHP Git repository.
git clone https://github.com/php/php-src.git --depth 1 --branch php-8.5.8
How to compile PHP
PHP can be compiled by setting up the dependencies, building the configure script (./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-8.5.8-x64NTS.zip
Size: 34.14 MiB SHA256: 63a3f6493f37c9ff3e288ec16621222a6cda5167dd1abffec0019e7f18c8e7e9
php-8.5.8-x86NTS.zip
Size: 30.62 MiB SHA256: 421ee83fb2288c79c56d7488e0f658070f73b6ad072bacc6b3572bc8ccdf57f9
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-8.5.8-x64TS.zip
Size: 34.27 MiB SHA256: a7323e50a1e29fddc278d9297ca9a4ec134bd1cca5396af39115284a125cab2f
php-8.5.8-x86TS.zip
Size: 30.67 MiB SHA256: 86a01ec179c6aba884e72b8b399589b6aab7749ee6bf782adb8c335f7c756778

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:8.5.8-cli-alpine

Debian-based: More compatible with other components, complete, and are widely used.
docker pull php:8.5.8-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:8.5.8-fpm-alpine

Debian-based ZTS Apache: Includes Apache web server integrating PHP as an Apache module.
docker pull php:8.5.8-apache

Debian-based NTS FPM: PHP-FPM, can be integrated with Nginx, Caddy, and other web servers over Fast CGI.
docker pull php:8.5.8-fpm

ChangeLog

Core

  • Fixed bug GH-22280 (Incorrect compile error for goto to label preceding try/finally block).
  • Fixed bug GH-22112 (Assertion when error handler throws during NaN to bool/string coercion).

BCMath

  • Fixed issues with oversized allocations and signed overflow in bcround() and BcMath\Number::round().

Date

  • Fix incorrect recurrence check of DatePeriod::createFromISO8601String().

Exif

  • Read correct value for single and double tags.

GD

  • Fixed bug GH-22121 (Double free in gdImageSetStyle() after overflow-triggered early return).

Intl

  • Fix incorrect argument positions for invalid start/end arguments in transliterator_transliterate().
  • Fixed IntlTimeZone::getDisplayName() to synchronize object error state for invalid display types.

Lexbor

  • Merge patch c3a6847.

Opcache

  • Fixed bug GH-22265 (Another tailcall vm_interrupt bug).
  • Fixed bug GH-20469 (Unsafe inheritance cache replay with reentrant autoloading).
  • Fixed bug GH-21972 (Corrupted variable type when a typed by-value return contains a reference wrapper).

Phar

  • Fixed a bypass of the magic ".phar" directory protection in Phar::addEmptyDir() for paths starting with "/.phar", while allowing non-magic directory names that merely share the ".phar" prefix.
  • Fixed an integer underflow when parsing ZIP extra fields.

Reflection

  • Preserve class-name case in ReflectionClass::getProperty() error messages and autoloading.

SOAP

  • Fixed bug GH-22218 (SoapServer::handle() crash on $_SERVER not being an array). (David Carlier / Rex-Reynolds)
  • Fixed bug GH-22285 (Soap server requires the raw input to be passed to $server->handle). (David Carlier / ndossche)

Sqlite

  • Fix error checks for column retrieval.

URI

  • Add LEXBOR_STATIC to CFLAGS_URI on Windows so ext/uri does not see LXB_API as __declspec(dllimport) when linked statically into PHP.
  • Clean error logs before each Uri\WhatWg\Url wither call so that errors from previous wither calls are not returned the next time a UrlValidationError is thrown.

Zip

  • Fixed error-related memory leaks.

Zlib

  • Fixed memory leak if deflate initialization fails and there is a dict.
  • Fixed memory leak in inflate_add().

Commit List

Bob Weinand

Daniel Scherzer

David Carlier

  • Fix GH-21986: PharData::getContent() crash on infinite recursion with symlinks in b2de3cf170
  • Fix GH-22071: JIT assertion on abstract static method call in 38e0aca422
  • Fix GH-19666: imageconvolution() unexpected nan filter value in ec8342c222
  • ext/intl: fix deprecation warning for GH-19666 test in 7500c86b15
  • Fix GH-19739: imageellipse/imagefilledellipse overflow in 5dd3909422
  • Fix GH-22138: skip libxml/xmlreader tests on non-ASCII paths in 673cb6d7a3
  • ext/standard: http(s) wrapper corrupts the basic auth header on percent-encoded userinfo in f357164ca5
  • Fix GH-19730: undefined behavior in gd_interpolation.c in cb8f7bd434
  • Fix GH-22218: SoapServer::handle() crash on non-array $_SERVER in 80d580b292
  • ext/mysqli: Fix stmt->query leak in mysqli_execute_query() validation errors in 6501051883
  • ext/dom: resolve in-scope prefixed QName values during document validation in 3b5eeb92df
  • ext/soap: ignore empty SOAPAction header during server dispatch in a9987fa80e
  • ext/openssl: openssl_encrypt() zend mm heap overflow on AES-WRAP-PAD mode in 1692268474

Ilia Alshanetsky

  • Fix GH-22121: double-free in gdImageSetStyle() after overflow early return in 6b68d9433f
  • intl: Fix memory leak in IntlChar::getFC_NFKC_Closure() in d70568ea9f
  • readline: Fix memory leak in interactive shell INI directive in 43838c4ca2
  • mbstring: Fix memory leak in mail header parsing in 61a1b9afd6
  • Fix GH-22112: assertion when error handler throws during NaN coercion in b8ff8d64ac
  • Fix use-after-free when ArrayObject sort comparator replaces backing store in 2210fda0e1
  • Fix zend_string leak on case-variant duplicate setcookie() options in 0c52780287

Ilija Tovilo

Jorg Adam Sowa

  • Preserve class-name case in ReflectionClass::getProperty() in GH-22272

lamentxu

  • ext/soap: Fix integer overflow when decoding SOAP array indexes in f5db09db14

LamentXU123

  • ext/intl: Guard Spoofchecker restriction-level APIs at ICU 53 in edde16948a

Levi Morrison

  • Fix another vm_interrupt bug for tailcall VM in GH-22265
  • fix GH-20469: unsafe inheritance cache replay with reentrant autoloading in GH-22221

Luther Monson

  • Define LEXBOR_STATIC in CFLAGS_URI for static ext/uri on Windows in GH-22165

Máté Kocsis

  • Clean Lexbor logs before each Uri\WhatWg\Url wither call in GH-22276
  • Apply lexbor fix for empty hosts in GH-22485

ndossche

  • zlib: fix memory leak if deflate initialization fails and there is a dict in b0ef5fcaa1
  • zlib: no need to free dict on inflate init error in 98a644c02d
  • zlib: Fix memory leak in inflate_add() in 73d9145ef5
  • zip: Fix file descriptor leak when php_zip_add_file() fails in 4c54dce2bc
  • zip: Fix name leaks when path length check fails in php_zip_pcre() in c4d4ceab2d
  • zip: Fix leak when zip_fread() fails in 17f67529fd
  • date: Fix typo in condition in date_period_init_iso8601_string() in f11c1facb4
  • sqlite: fix error checks for column retrieval in 407c45debc
  • exif: read from the correct pointer in d4a9726a2f

Nora Dossche

  • zlib: fix test skipif sections in GH-22099
  • Fix -Werror compile error in zend_dval_to_lval_cap() in GH-22196

Pratik Bhujel

Shivam Mathur

  • Make curl brotli and zstd optional on Windows in GH-21925
  • Switch to VS18 for the master branch in GH-22094
  • Fix Windows clang VM handler declaration in GH-22103

Tim Düsterhus

  • uri: Update contributor name in CREDITS in 95743e0e29
  • dom: Update contributor name in CREDITS in 83cddbb98b
  • lexbor: Run update_lexbor.sh (PHP 8.5) in 13f0993813

Volker Dusch

  • ext/bcmath: bounds-check $precision in bcround() and Number::round() in GH-22182

Weilin Du

  • ext/intl: Sync IntlTimeZone object errors for invalid display types in 9e68cf888a
  • ext/intl: Fix argument positions in transliterator_transliterate() error message in d8e741838a
  • ext/opcache: unwrap reference wrappers in typed by-value returns in GH-21973

“LamentXU123”

  • ext/intl: Fix argument position for uninitialized calendar arguments in 27d593e546
  • ext/intl: fix IntlListFormatter object error state after format() failures in 946d687d8d
  • ext/phar: improve .phar madic directory preservation logic in phar::addEmptyDir() in 3064540134
Subscribe to PHP.Watch newsletter for monthly updates

You will receive an email on last Wednesday of every month and on major PHP releases with new articles related to PHP, upcoming changes, new features and what's changing in the language. No marketing emails, no selling of your contacts, no click-tracking, and one-click instant unsubscribe from any email you receive.