Skip to content

[Windows] PHP 8.4 shows degraded performance when built with OpenSSL 3.0.* (suggest using OpenSSL 3.1+) #20224

@abdul-khan-lrn

Description

@abdul-khan-lrn

Description

Description

When upgrading from PHP 8.1 to PHP 8.4, we observed a significant slowdown in HTTPS requests made using cURL.
The same code that performs normally on PHP 8.1 takes almost 10× longer on PHP 8.4.

Reproduction Code

<?php
// SSL verification ON 
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, TRUE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);

Environment

PHP 8.4.13 (Windows, NTS x64, built with Visual C++ 2022)
OpenSSL 3.0.16 (11 Feb 2025) — as bundled with the official Windows build
cURL used with HTTPS endpoints (SSL verification ON)

Observed Behavior

HTTPS requests via curl_exec() are approximately 10× slower in PHP 8.4 compared to PHP 8.1.
The slowdown appears only when SSL verification is enabled.

Analysis

OpenSSL 3.0 is known to have performance regressions related to locking and property parsing:
OpenSSL issue #17627
Since the current PHP 8.4 Windows binaries are built with OpenSSL 3.0.16, this performance degradation is likely inherited from that version.

Suggested Resolution

Please consider building PHP 8.4 for Windows with OpenSSL 3.1 or later, which includes performance improvements addressing the above issues.

PHP Version

PS C:\Users\vagrant> php -v
PHP 8.4.13 (cli) (built: Sep 23 2025 14:36:17) (NTS Visual C++ 2022 x64)
Copyright (c) The PHP Group
Zend Engine v4.4.13, Copyright (c) Zend Technologies
    with Zend OPcache v8.4.13, Copyright (c), by Zend Technologies
PS C:\Users\vagrant> php -i | findstr /R /C:"OpenSSL" /C:"openssl"
SSL Version => OpenSSL/3.0.16
openssl
OpenSSL support => enabled
OpenSSL Library Version => OpenSSL 3.0.16 11 Feb 2025
OpenSSL Header Version => OpenSSL 3.0.16 11 Feb 2025
Openssl default config => C:\Program Files\Common Files\SSL/openssl.cnf
openssl.cafile => C:\Program Files\PHP\8.4.13\CACert\cacert.pem => C:\Program Files\PHP\8.4.13\CACert\cacert.pem
openssl.capath => no value => no value
OpenSSL support => enabled
PS C:\Users\vagrant>

Operating System

Windows

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions