# RFC: Drop 32-bit Builds

- Status: Inactive
- Authors: Marc Bennewitz, marc@mabe.berlin
- Date: 2025-06-18
- Version: 0.9
- Original: https://wiki.php.net/rfc/drop_32bit_support
- Page: https://externals.io/rfc/drop_32bit_support
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

## Discussions on the mailing list

- [\[RFC\] Drop support for 32bit builds](https://externals.io/message/127724.md) — started on 2025-06-19, 14 messages

---

## Introduction

Historically, PHP has supported both 32-bit and 64-bit environments. However, the vast majority of production deployments now use 64-bit systems. Major operating systems and distributions have either already dropped support for 32-bit architectures or are in the process of doing so. Maintaining 32-bit compatibility incurs development, testing, and ongoing maintenance overhead.

### Size Limit

32-bit environments have known limitations especially because PHP's `int` type being a platform-dependent signed integer. This restricts values to a range between `-2,147,483,648` and `2,147,483,647`. This constraint leads to several problems:

#### Year 2038 Problem

In PHP, UNIX timestamps are the number of seconds since 1970-01-01 UTC stored in a signed integer, which results in a valid range of 1901-12-13 20:45:52 UTC to 2038-01-19 03:14:07 UTC.

Knowing the correct current time is essential in many programming patterns including ...

- Time-based caching
- Timeout handling
- Auditing and logging
- Token Expiration (e.g. JWT `exp` field)

The following extensions / API functions are effected ...

- [date/time extension](https://www.php.net/manual/en/book.datetime.php)
    - most basic functions are effected like [date()](https://www.php.net/manual/en/function.date.php) and [time()](https://www.php.net/manual/en/function.time.php)
- [calendar extension](https://www.php.net/manual/en/book.calendar.php)
- [opcache\_get\_status()](https://www.php.net/opcache-get-status)
- file time related functions 
    - [fileatime()](https://www.php.net/manual/en/function.fileatime.php)
    - [filectime()](https://www.php.net/manual/en/function.filectime.php)
    - [filemtime()](https://www.php.net/manual/en/function.filemtime.php)
    - [stat()](https://www.php.net/manual/en/function.stat.php)
    - [lstat()](https://www.php.net/manual/en/function.lstat.php)
    - [fstat()](https://www.php.net/manual/en/function.fstat.php)
    - [touch()](https://www.php.net/manual/en/function.touch.php)
    - [getlastmod()](https://www.php.net/manual/en/function.getlastmod.php)
    - [SplFileInfo::getATime()](https://www.php.net/manual/en/splfileinfo.getatime.php) / [SplFileInfo::getCTime()](https://www.php.net/manual/en/splfileinfo.getctime.php) / [SplFileInfo::getMTime()](https://www.php.net/manual/en/splfileinfo.getmtime.php)
        - PharFileInfo extends SplFileInfo
    - [ZipArchive::setMtimeIndex()](https://www.php.net/manual/en/ziparchive.setmtimeindex.php)
    - [ZipArchive::setMtimeName()](https://www.php.net/manual/en/ziparchive.setmtimename.php)
- `memcache` / `memcached` expiration time handling <https://www.php.net/manual/en/memcached.expiration.php>

The only exceptions are:

- [DateTime](https://www.php.net/manual/en/class.datetime.php) / [DateTimeImmutable](https://www.php.net/manual/en/class.datetimeimmutable.php) classes, which internally uses `int64_t`. However, using this as a workaround is risky and error-prone, especially since timestamp-related methods (e.g., `DateTimeInterface::[get|set]Timestamp()`) are using PHP's signed integer type.
- [IntlCalendar](https://www.php.net/manual/en/class.intlcalendar.php) class, which is using floating point numbers in milliseconds.

#### File Size Limit

On 32-bit builds, PHP can handle files up-to 2g only. This includes file streams as well.

#### Memory Size Limit

On 32-bit builds, the PHP process is limited to 2g memory.

#### Other Problems

- [crc32()](https://www.php.net/crc32): On 32-bit systems, many checksum results appear as negative integers. On 64-bit systems, all results are positive.
- [ip2long()/long2ip()](https://www.php.net/ip2long): many IP addresses will result in negative integers on 32-bit environments.

### OS and Platform Support Status

Most major platforms and Linux distributions have already ended support for 32-bit installations, though some still allow building and running 32-bit applications on 64-bit kernels.

| **Distribution** | **32-bit Support Status** |
|---|---|
| --------------------------- | ------------------------------------------------------------------------------------ |
| Ubuntu | Dropped official 32-bit kernel and install media as of 19.10 |
| Debian | Dropped official 32-bit kernel and install media as of Debian 12 (Trixie) |
| Fedora | Dropped official 32-bit kernel and install media as of Fedora 31 |
| Arch Linux | Dropped i686 support in 2017 |
| openSUSE | Dropped 32-bit builds in Leap and Tumbleweed (Leap 15+ only supports 64-bit) |
| RHEL/CentOS/AlmaLinux/Rocky | RHEL 7 was the last version to support 32-bit; all current releases are 64-bit only |
| Windows | Dropped support for 32-bit systems as of Windows 11 |
| macOS | Dropped all 32-bit app support as of Catalina (10.15) |
| Apple Silicon | 64-bit ARM only — cannot run 32-bit code at all |

## Proposal

Deprecate 32-bit support in the next minor release (PHP 8.x). Completely drop 32-bit support in the next major release (PHP 9.0).

Starting with PHP 9.0, it will no longer be possible to build or run PHP on 32-bit environments.

## Backward Incompatible Changes

Beginning with PHP 9.0, PHP will no longer support 32-bit builds. Attempting to compile or run PHP in such environments will fail.

## Proposed PHP Version(s)

- PHP 8.x: Deprecate 32-bit support. Optionally warn users through deprecation notices.
- PHP 9.0: Fully remove support for 32-bit environments.

## RFC Impact

This RFC makes it impossible to build or run PHP on 32-bit-only platforms starting with PHP 9.0.

Also, it will not be possible to build PHP with 32-bit on 64-bit kernels.

## Open Issues

Is it enough to inform users about this deprecation in the documentation or should the next minor release explicitly emit deprecation warnings when running or building on 32-bit builds?

## Unaffected PHP Functionality

64-bit builds will remain fully supported and unaffected by this change.

## Future Scope

This section details areas where the feature might be improved in future, but that are not currently proposed in this RFC.

## Proposed Voting Choices

This requires a 2/3 majority. It is straight Yes/No vote to accepting the RFC.

## Patches and Tests

PR to deprecate 32bit builds of PHP : <https://github.com/php/php-src/pull/18876>

## Implementation

After the project is implemented, this section should contain

1. the version(s) it was merged into
2. a link to the git commit(s)
3. a link to the PHP manual entry for the feature
4. a link to the language specification section (if any)

## References

ML Year 2028 issue : <https://discourse.thephp.foundation/t/php-dev-year-2038-issue/1904>

ML Discussion : <https://discourse.thephp.foundation/t/php-dev-rfc-drop-support-for-32bit-builds/1919>

ML Vote : TBD

## Rejected Features

Keep this updated with features that were discussed on the mail lists.
