Commit cd583348b19 for php

commit cd583348b19deed810eacf47e67dbe0613000c48
Author: Sjoerd Langkemper <sjoerd-github@linuxonly.nl>
Date:   Sun Oct 18 12:51:50 2026 +0200

    ext/curl: speed up tests (#23228)

    By waiting shorter for the server to be ready.

    The first check for output on stderr takes approximately 10ms, so we
    wait 20ms to make sure its ready. The second check for the open port
    typically succeeds immediately, so move the sleep to after we have
    tried.

    Change the numbers in curl_setopt_ssl.phpt for consistency.

diff --git a/ext/curl/tests/curl_setopt_ssl.phpt b/ext/curl/tests/curl_setopt_ssl.phpt
index 80283b9d6ca..3831e1a7265 100644
--- a/ext/curl/tests/curl_setopt_ssl.phpt
+++ b/ext/curl/tests/curl_setopt_ssl.phpt
@@ -75,7 +75,7 @@ function check_response($response, $clientCertSubject) {
 try {
     // Wait until OpenSSL is actually listening before making the first request.
     $ready = false;
-    for ($i = 0; $i < 100; $i++) {
+    for ($i = 0; $i < 150; $i++) {
         $connection = @stream_socket_client("tcp://127.0.0.1:$port", $errno, $errstr, 0.05);
         if ($connection !== false) {
             fclose($connection);
@@ -85,7 +85,7 @@ function check_response($response, $clientCertSubject) {
         if (!proc_get_status($process)['running']) {
             break;
         }
-        usleep(50000);
+        usleep(20000);
     }
     if (!$ready) {
         stream_set_blocking($pipes[2], false);
diff --git a/ext/curl/tests/server.inc b/ext/curl/tests/server.inc
index a7b177593db..2623eb7e8d4 100644
--- a/ext/curl/tests/server.inc
+++ b/ext/curl/tests/server.inc
@@ -15,8 +15,8 @@ function curl_cli_server_start() {
     // First, wait for the dev server to declare itself ready.
     $bound = null;
     stream_set_blocking($pipes[2], false);
-    for ($i = 0; $i < 60; $i++) {
-        usleep(50000); // 50ms per try
+    for ($i = 0; $i < 150; $i++) {
+        usleep(20000); // 20ms per try
         $status = proc_get_status($handle);
         if (empty($status['running'])) {
             echo "Server is not running\n";
@@ -44,8 +44,7 @@ function curl_cli_server_start() {
     // note: even when server prints 'Listening on localhost:8964...Press Ctrl-C to quit.'
     //       it might not be listening yet...need to wait until fsockopen() call returns
     $error = "Unable to connect to server\n";
-    for ($i=0; $i < 60; $i++) {
-        usleep(50000); // 50ms per try
+    for ($i=0; $i < 150; $i++) {
         $status = proc_get_status($handle);
         $fp = @fsockopen("tcp://$bound");
         // Failure, the server is no longer running
@@ -58,6 +57,7 @@ function curl_cli_server_start() {
             $error = '';
             break;
         }
+        usleep(20000); // 20ms per try
     }

     if ($fp) {
@@ -74,12 +74,12 @@ function curl_cli_server_start() {
         function($handle) {
             proc_terminate($handle);
             /* Wait for server to shutdown */
-            for ($i = 0; $i < 60; $i++) {
+            for ($i = 0; $i < 150; $i++) {
                 $status = proc_get_status($handle);
                 if (!($status && $status['running'])) {
                     break;
                 }
-                usleep(50000);
+                usleep(20000);
             }
         },
         $handle