Commit 583403a9a0e for php.net

commit 583403a9a0e965c64d3152ff73c3e208375db507
Author: Weilin Du <weilindu@php.net>
Date:   Fri Jul 17 20:05:20 2026 +0800

    ext/sockets: Fix TCP_USER_TIMEOUT range error message

    This is a follow-up commit to 3882f55 where all
    malformed error message in the socket extension
    in 8.5 has been fixed. This fixed a specific one appears
    only in the master branch.

diff --git a/NEWS b/NEWS
index b63ae8a81c9..c548f32d052 100644
--- a/NEWS
+++ b/NEWS
@@ -30,7 +30,7 @@ PHP                                                                        NEWS

 - Sockets:
   . Fixed socket_set_option() validation error messages for UDP_SEGMENT and
-    SO_LINGER options. (Weilin Du)
+    TCP_USER_TIMEOUT, and SO_LINGER options. (Weilin Du)

 16 Jul 2026, PHP 8.6.0alpha2

diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c
index ea90c2ae642..9c9c86ba673 100644
--- a/ext/sockets/sockets.c
+++ b/ext/sockets/sockets.c
@@ -2154,7 +2154,7 @@ PHP_FUNCTION(socket_set_option)

 			// TCP_USER_TIMEOUT unsigned int
 			if (timeout < 0 || timeout > UINT_MAX) {
-				zend_argument_value_error(4, "must be of between 0 and %u", UINT_MAX);
+				zend_argument_value_error(4, "must be between 0 and %u", UINT_MAX);
 				RETURN_THROWS();
 			}

diff --git a/ext/sockets/tests/socket_setoption_tcpusertimeout_32bit.phpt b/ext/sockets/tests/socket_setoption_tcpusertimeout_32bit.phpt
index 3f12120e54d..05970b71987 100644
--- a/ext/sockets/tests/socket_setoption_tcpusertimeout_32bit.phpt
+++ b/ext/sockets/tests/socket_setoption_tcpusertimeout_32bit.phpt
@@ -29,6 +29,6 @@
 socket_close($socket);
 ?>
 --EXPECTF--
-socket_setopt(): Argument #4 ($value) must be of between 0 and %d
+socket_setopt(): Argument #4 ($value) must be between 0 and %d
 bool(true)
 bool(true)
diff --git a/ext/sockets/tests/socket_setoption_tcpusertimeout_64bit.phpt b/ext/sockets/tests/socket_setoption_tcpusertimeout_64bit.phpt
index 8dbb7f80e48..894a24d2a49 100644
--- a/ext/sockets/tests/socket_setoption_tcpusertimeout_64bit.phpt
+++ b/ext/sockets/tests/socket_setoption_tcpusertimeout_64bit.phpt
@@ -35,7 +35,7 @@
 socket_close($socket);
 ?>
 --EXPECTF--
-socket_setopt(): Argument #4 ($value) must be of between 0 and %d
-socket_setopt(): Argument #4 ($value) must be of between 0 and %d
+socket_setopt(): Argument #4 ($value) must be between 0 and %d
+socket_setopt(): Argument #4 ($value) must be between 0 and %d
 bool(true)
 bool(true)