PHP 8.1.0alpha2: Downloads, Changelog, News

Release Information

PHP Version
PHP 8.1
Release Date
Release Type
Bug Fix Release
Release Status
Use PHP 8.1.29 instead
Branch Status
Security-Fixes Only

PHP 8.1 is currently only receiving security fixes. PHP 8.1.0alpha2 is not the latest version in the series, and using this release is not recommended. PHP 8.1.29 is the latest in the series.


Source Code

Git Clone
Use Git to clone the 8.1.0alpha2 tag from the PHP Git repository.
git clone --depth 1 --branch php-8.1.0alpha2
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.
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.

Docker/Podman Containers

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.1.0alpha2-cli-alpine

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

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

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

Commit List

Aaron Piotrowski

  • Improve fiber interoperability in GH-7128
  • Reorganize zend_test and add custom fiber implementation tests in GH-7137
  • Change stack field to a pointer in fiber context in 7df3fd9d55
  • Add test for leaking prior context with symmetric coroutines in f5c209989a
  • Add API to prevent Fiber switch in select contexts in fdc22744a8
  • Remove fiber context embedding in 859524c246
  • Drop fiber block hooks in 5d4f05527b
  • Rename Fiber::this() to Fiber::getCurrent() in GH-7155
  • Fiber cleanup in f71d62e3d2
  • Remove copying of fiber result to transfer value in 15dcdd7672

Alex Dowad

  • Improve documentation for contributors in 5d37cd97e4
  • Add test suite for UTF-{7,8,16,32} in 7502c86342
  • Remove duplicate implementation of CP932 from mbstring in e2459857af
  • Mark CP932 and CP51932 encoding tests as 'slow tests' in 9868c17368
  • Minor formatting tweaks in mbfilter_uhc.c in 4550036d96
  • Strict conversion of UHC text to Unicode in caeaa662ab
  • When flushing CP5022x conversion filter, also flush next filter in chain in 958ef47d2b
  • Minor formatting tweaks in mbfilter_euc_kr.c in b1ab76f742

Anatol Belski

Benjamin Eberlei

  • Add host for php_network_getaddresses getaddrinfo failed error message. in GH-7181

Ben Morss

Ben Ramsey

  • Fix typo in ezmlm command in release-process doc in fe4fcc854b
  • Update versions for PHP 8.1.0alpha2 in 59056f74b9
  • Prepare NEWS for PHP 8.1.0alpha2 in 4ff1cd6a9c

Calvin Buckley

  • Enable net_get_interfaces on IBM i PASE in 4f51a11a84

Christoph M. Becker

  • bug81119.phpt requires ext/gmp in 9ef313d146
  • Fix #81120: PGO data for main PHP DLL are not used in 21f2ff79de
  • Fix test wrt. OPENSSL_CONF in d15e10d7ab
  • Remove temporary workaround for installing libavif in aee1daa81b
  • Improve performance of AppVeyor test runs in 139a73b5a4
  • Fix #72809: Locale::lookup() wrong result with canonicalize option in 0f1b17e378
  • Fix #81145: copy() and stream_copy_to_stream() fail for +4GB files in 2555efadbc
  • Fix test in case fallocate(1) is available, but fails in 99e7c5cea8


  • fdatasync disable warning on macOS. in GH-7122
  • Litespeed sapi OpenBSD build fix in GH-3999
  • define SO_ACCEPTFILTER separately where supported in GH-7146
  • exposing few macOS socket options to give hints how to handle data, in c4a005bb2d

David Carlier

  • sockets exposing TC_DEFER_ACCEPT to optimise tcp exchanges in fc147ed8db


  • Add IntlDatePatternGenerator in GH-6771

Derick Rethans

Dmitry Stogov

  • JIT/AArch64: Use only reserved TMP registers for EG(jit_trace_num) assignment in 029d06992e
  • JIT/AArch64: Use only reserved TMP registers for EG(vm_interrupt) checks in 3fa0c99a1b
  • JIT/x86: Reuse code when MOD is going to be converted to AND in 62e0b83204
  • JIT/ARM64: Improve JIT for MOD instruction in af319b072a
  • JIT/ARM64: Remove redundand x86 specific optimization for recursive calls in cd90655ebc
  • Typo in 539948924c
  • Fixed bug #81096: Inconsistent range inferece for variables passed by reference in 7368d0c418
  • Functions with static variables are not separated anymore in b0dcc4c060
  • Reorder conditions and always mark methods in SHM as ZEND_ACC_IMMUTABLE in bd98d84e57
  • Fix assertions in c8ff5a1082
  • Fixed incorrect map_ptr slots counting in 8ae06582c6
  • JIT: Avoid too aggressive loop unrolling in 3a78259525
  • Fixed incorrect type inference for "(array)$null" in df16fd149b
  • JIT: Fixed failures of tracing JIT with CALL VM in 1082669e24
  • JIT/ARM64: Fixed "may be used uninitialized" compilation warning in 82bcc9b497
  • JIT/x86: Fixed possible incorrect register allocation in ced8e88438
  • JIT/ARM64: Fixed possible incorrect register allocation in d72c320ff6

Florian Engelhardt

  • Create filter_null_on_failure.phpt  in 62ed41da7e

Gabriel Caruso

George Peter Banyard

Hao Sun

  • JIT/AArch64: Fix codestyle issues in GH-7125
  • JIT/AArch64: Use 'tbnz/tbz' to check the signedness in GH-7123


  • phar: use crc32 bulk method instead. in GH-6099

Joe Watkins


  • UPGRADING: update information re: return type for internal methods in GH-7182

Martin Schröder

  • Unify control & data transfer between fibers in GH-7120
  • Destroy previous fiber context in trampoline as needed in GH-7143
  • Do not expose fiber VM state management in GH-7170
  • Flexible fiber bailout handling in GH-7163

Nikita Popov

  • Remove dual_it dtor, add more GC roots in 88c57df53d
  • Store cached string as zend_string in d7eea8e1be
  • Remove zend_make_printable_zval() use in debug code in ff2fbd0ecb
  • Simplify string management in RecursiveTreeIterator in 6b9ffaff56
  • Use zend_string* for RecursiveTreeIterator prefixes in b2cf198733
  • Null out member after releasing in 67440dd695
  • Don't perform recursive get_gc call in 0643301c75
  • Support GC for RecursiveIteratorIterator in 9c18138a71
  • Remove explicit assignments of zend_objects_destroy_object in 9d2a466c4b
  • Remove SimpleXMLElement dtor_obj handler in cde735e630
  • Remove redundant dtor_obj handlers in intl in cdbf3fdcdd
  • Convert UConverter dtor_obj to free_obj in e79a8c05ad
  • Disable file_cache_only as well in optimizer pass test in 4c37645acf
  • Use free_obj handler in HashContext in 050e13c55e
  • Use free_obj handler in FTPConnection in d982f4eb28
  • Use free_obj in IMAP\Connection in bc8aa7d0e0
  • Remove dom_nnodemap dtor_obj handler in 0ce2359233
  • Rerun GC if destructors encountered in b58d74547f
  • Make PRE_INC/PRE_DEC type inference more accurate in cbe485db05
  • Avoid make_printable_zval() in intl collator in 5c5727a57b
  • Avoid make_printable_zval in snprintf in a1473aadf8
  • Avoid make_printable_zval() in other printf implementations as well in dd91170ee2
  • Mitigation for bug #81096 in 3f4bc94b00
  • Fix PHP_ADD_EXTENSION_DEP without indentation in be92a87371
  • Fix bug #81119 in 087773879f
  • Use non-cron builds on travis in 7aa0d74398
  • Regenerate stubs in f172bb30be
  • Migrate SKIPIF -> EXTENSIONS in GH-7138
  • Fix test file name in e0dc84d3f6
  • Drop handling for PHP_CURL_HTTP_REMOVE_SERVER in e989492f1a
  • Migrate more SKIPIF -> EXTENSIONS in GH-7139
  • Port curl, xml, xsql to use EXTENSIONS in GH-7140
  • Port mbstring to use EXTENSIONS in 4083600bd5
  • Fix EXTENSIONS for cgi tests in ea126c5204
  • Port files to EXTENSIONS in b5a14e6c04
  • Fix bug #81112: Implement JsonSerializable for SplFixedArray in 805471e86b
  • Fix bug #80945: Don't throw undefined array key warning in ArrayObject unset() in 71fb83567f
  • Allow named args after unpack in 1c08f8a48a
  • Make LDAPCONF test work on windows in 748568268a
  • Use EXTENSIONS section for ldap in 849a34e490
  • Fixed bug #80197 in 5dc31e0cb6
  • Regenerate arginfo file in b6fa386749
  • Drop fast_div_function in 821a5a1239
  • Remove duplicate entries in EXTENSIONS in 72f47c0c9d
  • Fix EXTENSIONS section for pgsql in e378968c4f
  • Add some missing EXTENSIONS sections to misc tests in 6600ad6067
  • Add missing dba extension requirement in pgsql test in a148ea2c50
  • Move tests requiring pdo_sqlite into ext directory in 584dc19df1
  • Add missing zend_test dependency in fcccb4c593
  • Move test from intl to iconv in 1eaaabca2b
  • Remove unnecessary mbstring skipifs in a06d015e61
  • Remove unnecessary curl version guards in stubs in 06053e9b67
  • Remove unnecessary curl skipifs in ca423a1b39
  • Remove unnecessary skipifs in date in 6ce9076b2d
  • Make some zend_test dependencies explicit in 892421c9a8
  • Clean up some more function_exists() checks in 9871a624bf
  • Fix prototype in 0eafc97d29
  • Remove unnecessary IS_UNUSED check in 34257e1cfc
  • Fix missing error for single index unset on wrong type in b64213872a
  • Use different error condition in ACCEL_LOG_FATAL test in 591dcdbdb0
  • Fix printf formats in mysql debug logging in 3acdab864d
  • Fix more mysqlnd debug printf formats in 57f06b6058
  • Fix mysqlnd debug formats on 32-bit in c492c90a6e
  • Test ARM64 JIT on Travis in GH-7157
  • Drop support for printf p modifier in 0d6358f2cf
  • Fix #81150 Add UPGRADING note for float to int deprecation in deb7955bf4
  • Extract helper for fetching class entry in optimizer in 0d9269de75
  • Make can_elide_return_type_check() more robust in a30fab57eb
  • Deduplicate code for handling zend_type in inference in be369dec70

Patrick Allaert

  • Preparing for alpha2 in 87068aead9
  • Convert some recently introduced zend_bool to bool in ceb6fa6dc0

Remi Collet

Sergei Morozov

  • [Bug #77120] Handle OCI_SUCCESS_WITH_INFO returned from OCISessionBegin in ee51eac39f
  • [Bug #77120] Handle OCI_SUCCESS_WITH_INFO returned from OCIStmtExecute in e496123c36


Tyson Andre

  • Use 16 instead of 15 bytes of random data in ReflectionReference->getId in GH-7148
  • Allow build/gen_stub.php to process multiple CLI file args in GH-7179
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.