Commit 5a9d50dc61c for php

commit 5a9d50dc61c456f4db5d9fd9442c480669334f4c
Author: Noah Webber <124526540+aguashui@users.noreply.github.com>
Date:   Thu Sep 24 08:56:13 2026 -0500

    Fix typos, grammatical errors, and refactor misspelled local identifiers (#23803)

    Correct typographical and grammatical mistakes across docs, comments, and build tools. Refactor local identifiers childrens to children in RecursiveFilterIterator and sav to saved_char in sapi_header_add_op.

diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index 5ef6bbddc3b..acbf10e163e 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -1785,7 +1785,7 @@ ZEND_API void object_properties_load(zend_object *object, const HashTable *prope
 				(property_info->flags & ZEND_ACC_STATIC) == 0) {
 				bool is_typed = ZEND_TYPE_IS_SET(property_info->type);

-				/* Mimick unserialize behaviour for virtual properties. */
+				/* Mimic unserialize behaviour for virtual properties. */
 				if (UNEXPECTED(property_info->flags & ZEND_ACC_VIRTUAL)) {
 					zend_throw_error(NULL, "Cannot unserialize value for virtual property %s::$%s", ZSTR_VAL(object->ce->name), zend_get_unmangled_property_name(property_info->name));
 					return;
@@ -1808,7 +1808,7 @@ ZEND_API void object_properties_load(zend_object *object, const HashTable *prope
 						ZVAL_COPY(&val, prop);
 						ZEND_REF_ADD_TYPE_SOURCE(Z_REF_P(&val), property_info);
 					} else {
-						/* Mimick zend_assign_to_typed_prop() by reporting the error before doing work. */
+						/* Mimic zend_assign_to_typed_prop() by reporting the error before doing work. */
 						if (UNEXPECTED((property_info->flags & ZEND_ACC_READONLY)
 						 && !Z_ISUNDEF_P(slot)
 						 && !(Z_PROP_FLAG_P(slot) & IS_PROP_REINITABLE))) {
diff --git a/Zend/zend_call_stack.c b/Zend/zend_call_stack.c
index 40f0c7e549c..7b1bd16c587 100644
--- a/Zend/zend_call_stack.c
+++ b/Zend/zend_call_stack.c
@@ -245,7 +245,7 @@ static bool zend_call_stack_get_linux_proc_maps(zend_call_stack *stack)
 	max_size = rlim.rlim_cur;

 #ifdef HAVE_VALGRIND
-	/* Under Valgrind, the last page is not useable */
+	/* Under Valgrind, the last page is not usable */
 	if (RUNNING_ON_VALGRIND) {
 		max_size -= zend_get_page_size();
 	}
@@ -388,7 +388,7 @@ static bool zend_call_stack_get_win32(zend_call_stack *stack)
 	 * is left in the uncommitted region, a stack overflow error is raised
 	 * instead.
 	 *
-	 * The total useable stack size is the size of the committed and uncommitted
+	 * The total usable stack size is the size of the committed and uncommitted
 	 * regions less one page.
 	 *
 	 * http://blogs.msdn.com/b/satyem/archive/2012/08/13/thread-s-stack-memory-management.aspx
diff --git a/Zend/zend_partial.c b/Zend/zend_partial.c
index 497e9b80d57..1f74830b900 100644
--- a/Zend/zend_partial.c
+++ b/Zend/zend_partial.c
@@ -914,13 +914,13 @@ static zend_op_array *zp_compile(zval *this_ptr, zend_function *function,
 	/**
 	 * Generate function body.
 	 *
-	 * If we may need to forward superflous arguments, do that conditionally, as
+	 * If we may need to forward superfluous arguments, do that conditionally, as
 	 * it's faster:
 	 *
 	 * if (func_num_args() <= n) {
 	 *    // normal call
 	 * } else {
-	 *    // call with superflous arg forwarding
+	 *    // call with superfluous arg forwarding
 	 * }
 	 *
 	 * The func_num_args() call should be compiled to a single FUNC_NUM_ARGS op.
diff --git a/build/gen_stub.php b/build/gen_stub.php
index cb41618867c..edcb58710d6 100755
--- a/build/gen_stub.php
+++ b/build/gen_stub.php
@@ -2413,7 +2413,7 @@ public function getCExpr(): ?string
             // interpolation shouldn't be possible in a stub, so we don't need
             // to worry about mangling such a case.
             if (preg_match("/(^'|'$)/", $expr)) {
-                $expr = substr($expr, 1, -1); // strip quotes, readd later
+                $expr = substr($expr, 1, -1); // strip quotes, re-add later
                 $expr = str_replace("\\'", "'", $expr);
                 $expr = addcslashes($expr, "\\\"");
                 $expr = "\"$expr\"";
diff --git a/docs/release-process.md b/docs/release-process.md
index 08a0c0e9f63..6ba9b27be6c 100644
--- a/docs/release-process.md
+++ b/docs/release-process.md
@@ -1094,7 +1094,7 @@ volunteers to begin the selection process for the next release managers.

 4. File a [ticket in the infrastructure](https://github.com/php/infrastructure/issues/new?template=request-release-manager-access.yml)
    project and provide an SSH key, your @php.net email address, your GitHub
-   account name, and your preferred system account name. Preferrably they're
+   account name, and your preferred system account name. Preferably they're
    all the same!

 5. Read [Logging into Servers](https://github.com/php/infrastructure/blob/main/docs/ServerAccess.rst#logging-into-servers) to set up
diff --git a/ext/dom/html_document.c b/ext/dom/html_document.c
index ddf8f3f66f8..5f190ec7c97 100644
--- a/ext/dom/html_document.c
+++ b/ext/dom/html_document.c
@@ -302,7 +302,7 @@ static void dom_lexbor_libxml2_bridge_tree_error_reporter(
 	dom_lexbor_libxml2_bridge_application_data *application_data = application_data_voidptr;

 	if (line == 1 && application_data->html_no_implied && error->id == LXB_HTML_RULES_ERROR_UNTOININMO) {
-		/* For no implied mode, we want to mimick libxml's behaviour of not reporting an error for a lacking doctype. */
+		/* For no implied mode, we want to mimic libxml's behaviour of not reporting an error for a lacking doctype. */
 		return;
 	}

diff --git a/ext/ext_skel.php b/ext/ext_skel.php
index 3237ca625c9..b81170e91f5 100755
--- a/ext/ext_skel.php
+++ b/ext/ext_skel.php
@@ -223,7 +223,7 @@ function process_args($argv, $argc) {
     // Validate vendor
     if (!preg_match('/^[a-z][a-z0-9_-]+$/i', $options['vendor'])) {
         error('Invalid vendor name. Valid names start with a letter,'
-            .' followed by any number of letters, numbers, hypens, or underscores.');
+            .' followed by any number of letters, numbers, hyphens, or underscores.');
     }

     $options['ext'] = str_replace(['\\', '/'], '', strtolower($options['ext']));
diff --git a/ext/ftp/php_ftp.c b/ext/ftp/php_ftp.c
index 31947af455c..3f22485c39a 100644
--- a/ext/ftp/php_ftp.c
+++ b/ext/ftp/php_ftp.c
@@ -615,7 +615,7 @@ PHP_FUNCTION(ftp_fget)
 }
 /* }}} */

-/* {{{ Retrieves a file from the FTP server asynchronly and writes it to an open file */
+/* {{{ Retrieves a file from the FTP server asynchronously and writes it to an open file */
 PHP_FUNCTION(ftp_nb_fget)
 {
 	zval		*z_ftp;
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c
index 5786a93ac96..cc9cd17a184 100644
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
@@ -3674,7 +3674,7 @@ static zend_result accel_post_startup(void)
 	}

 	if (ZCG(enabled) && accel_startup_ok) {
-		/* Override inheritance cache callbaks */
+		/* Override inheritance cache callbacks */
 		accelerator_orig_inheritance_cache_get = zend_inheritance_cache_get;
 		accelerator_orig_inheritance_cache_add = zend_inheritance_cache_add;
 		zend_inheritance_cache_get = zend_accel_inheritance_cache_get;
diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c
index 85109c7d0e0..7b6f6223785 100644
--- a/ext/opcache/jit/zend_jit.c
+++ b/ext/opcache/jit/zend_jit.c
@@ -2032,7 +2032,7 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op
 						}
 						op1_info = OP1_INFO();
 						if (ra && ssa->vars[ssa_op->op1_use].no_val) {
-							op1_info |= MAY_BE_UNDEF; // requres type assignment
+							op1_info |= MAY_BE_UNDEF; // requires type assignment
 						}
 						if (opline->result_type == IS_UNUSED) {
 							res_addr = 0;
diff --git a/ext/opcache/jit/zend_jit_ir.c b/ext/opcache/jit/zend_jit_ir.c
index 9849bda4cd2..cc859d4eb99 100644
--- a/ext/opcache/jit/zend_jit_ir.c
+++ b/ext/opcache/jit/zend_jit_ir.c
@@ -478,7 +478,7 @@ static bool zend_jit_prefer_const_addr_load(zend_jit_ctx *jit, uintptr_t addr)
 #if defined(IR_TARGET_X86)
 	return false; /* always use immediate value */
 #elif defined(IR_TARGET_X64)
-	return addr > 0xffffffff; /* prefer loading long constant from memery */
+	return addr > 0xffffffff; /* prefer loading long constant from memory */
 #elif defined(IR_TARGET_AARCH64)
 	return addr > 0xffff;
 #else
@@ -4581,7 +4581,7 @@ static int zend_jit_load_var(zend_jit_ctx *jit, uint32_t info, int var, int ssa_
 static int zend_jit_invalidate_var_if_necessary(zend_jit_ctx *jit, uint8_t op_type, zend_jit_addr addr, znode_op op)
 {
 	if ((op_type & (IS_TMP_VAR|IS_VAR)) && Z_MODE(addr) == IS_REG && !Z_LOAD(addr) && !Z_STORE(addr)) {
-		/* Invalidate operand type to prevent incorrect destuction by exception_handler_free_op1_op2() */
+		/* Invalidate operand type to prevent incorrect destruction by exception_handler_free_op1_op2() */
 		zend_jit_addr dst = ZEND_ADDR_MEM_ZVAL(ZREG_FP, op.var);
 		jit_set_Z_TYPE_INFO(jit, dst, IS_UNDEF);
 	}
@@ -8610,7 +8610,7 @@ static int zend_jit_push_call_frame(zend_jit_ctx *jit, const zend_op *opline, co
 	rx = jit_IP(jit);
 #if !OPTIMIZE_FOR_SIZE
 	/* JIT: EG(vm_stack_top) = (zval*)((char*)call + used_stack);
-	 * This vesions is longer but faster
+	 * This version is longer but faster
 	 *    mov EG(vm_stack_top), %CALL
 	 *    lea size(%call), %tmp
 	 *    mov %tmp, EG(vm_stack_top)
@@ -11174,7 +11174,7 @@ static int zend_jit_leave_func(zend_jit_ctx         *jit,
 		if (fast_path) {
 			ir_MERGE_WITH(fast_path);
 		}
-		// TODO: avoid EG(excption) check for $this->foo() calls
+		// TODO: avoid EG(exception) check for $this->foo() calls
 		may_throw = 1;
 	}

@@ -12052,7 +12052,7 @@ static int zend_jit_fetch_dimension_address_inner(zend_jit_ctx  *jit,
 #if SIZEOF_ZEND_LONG == 8
 				if ((Z_MODE(op2_addr) == IS_CONST_ZVAL && val >= 0 && val <= UINT32_MAX)
 				 || (op2_range && op2_range->min >= 0 && op2_range->max <= UINT32_MAX)) {
-					/* comapre only the lower 32-bits to allow load fusion on x86_64 */
+					/* compare only the lower 32-bits to allow load fusion on x86_64 */
 					cond = ir_ULT(ir_TRUNC_U32(h), ref);
 				} else {
 					cond = ir_ULT(h, ir_ZEXT_L(ref));
diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c
index 5408b29fc4e..488d2602769 100644
--- a/ext/opcache/jit/zend_jit_trace.c
+++ b/ext/opcache/jit/zend_jit_trace.c
@@ -938,7 +938,7 @@ static int zend_jit_trace_copy_ssa_var_info(const zend_op_array  *op_array,
 			return 0;
 		}
 		if (opline) {
-			/* Try to find a difinition in SSA dominators tree */
+			/* Try to find a definition in SSA dominators tree */
 			var = tssa->vars[ssa_var].var;
 			uint32_t op_num = opline - op_array->opcodes;
 			uint32_t b = ssa->cfg.map[op_num];
diff --git a/ext/opcache/shared_alloc_posix.c b/ext/opcache/shared_alloc_posix.c
index 212453bc8e3..9f59140cc64 100644
--- a/ext/opcache/shared_alloc_posix.c
+++ b/ext/opcache/shared_alloc_posix.c
@@ -46,7 +46,7 @@ static int create_segments(size_t requested_size, zend_shared_segment_posix ***s
 	 * architectures have 3 entries max and we are interested
 	 * from the second offset minimum to be worthy creating
 	 * a special shared segment tagged as 'large'.
-	 * only then amd64/i386/arm64 and perharps risc64*
+	 * only then amd64/i386/arm64 and perhaps risc64*
 	 * archs are on interest here.
 	 */
 	size_t shared_segment_lg_index = 0;
diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c
index 24895a96004..8906cf3374b 100644
--- a/ext/openssl/xp_ssl.c
+++ b/ext/openssl/xp_ssl.c
@@ -2480,7 +2480,7 @@ static zend_result php_openssl_setup_server_session(php_stream *stream,
 			SSL_CTX_sess_set_remove_cb(sslsock->ctx, php_openssl_session_remove_cb);
 		}

-		// Disable tickets (they won't work anyway) and warn if explicity enabled
+		// Disable tickets (they won't work anyway) and warn if explicitly enabled
 		SSL_CTX_set_options(sslsock->ctx, SSL_OP_NO_TICKET);
 		if (GET_VER_OPT("no_ticket") && !zend_is_true(val)) {
 			zend_value_error("Session tickets cannot be enabled when session_get_cb is set");
diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c
index 0eb6645608e..c7cf92cfdfa 100644
--- a/ext/pdo/pdo_stmt.c
+++ b/ext/pdo/pdo_stmt.c
@@ -648,7 +648,7 @@ static bool pdo_call_fetch_object_constructor(zend_function *constructor, HashTa
 }

 /* Performs a row fetch, the value is stored into return_value according to HOW.
- * retun_value MUST be safely destroyable as it will be freed if an error occurs. */
+ * return_value MUST be safely destroyable as it will be freed if an error occurs. */
 static bool do_fetch(pdo_stmt_t *stmt, zval *return_value, enum pdo_fetch_type how, enum pdo_fetch_orientation ori, zend_long offset, zval *group_key) /* {{{ */
 {
 	int flags;
diff --git a/ext/random/CREDITS b/ext/random/CREDITS
index c647fb7d225..42731f65b87 100644
--- a/ext/random/CREDITS
+++ b/ext/random/CREDITS
@@ -1,2 +1,2 @@
 random
-Go Kudo, Tim Düsterhus, Guilliam Xavier, Christoph M. Becker, Jakub Zelenka, Bob Weinand, Máté Kocsis, and Original RNG implementators
+Go Kudo, Tim Düsterhus, Guilliam Xavier, Christoph M. Becker, Jakub Zelenka, Bob Weinand, Máté Kocsis, and Original RNG implementers
diff --git a/ext/session/mod_user.c b/ext/session/mod_user.c
index 174a0e4822e..a023ef7e428 100644
--- a/ext/session/mod_user.c
+++ b/ext/session/mod_user.c
@@ -59,14 +59,14 @@ static zend_result verify_bool_return_type_userland_calls(const zval *value)
 		return FAILURE;
 	}
 	if ((Z_TYPE_P(value) == IS_LONG) && (Z_LVAL_P(value) == -1)) {
-		/* TODO Why are exception cheked? */
+		/* TODO Why are exceptions checked? */
 		if (!EG(exception)) {
 			php_error_docref(NULL, E_DEPRECATED, "Session callback must have a return value of type bool, %s returned", zend_zval_value_name(value));
 		}
 		return FAILURE;
 	}
 	if ((Z_TYPE_P(value) == IS_LONG) && (Z_LVAL_P(value) == 0)) {
-		/* TODO Why are exception cheked? */
+		/* TODO Why are exceptions checked? */
 		if (!EG(exception)) {
 			php_error_docref(NULL, E_DEPRECATED, "Session callback must have a return value of type bool, %s returned", zend_zval_value_name(value));
 		}
diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c
index 16571158610..914c0206b5c 100644
--- a/ext/spl/spl_directory.c
+++ b/ext/spl/spl_directory.c
@@ -38,7 +38,7 @@ static zend_object_handlers spl_filesystem_object_handlers;
 /* includes handler to validate object state when retrieving methods */
 static zend_object_handlers spl_filesystem_object_check_handlers;

-/* decalre the class entry */
+/* declare the class entry */
 PHPAPI zend_class_entry *spl_ce_SplFileInfo;
 PHPAPI zend_class_entry *spl_ce_DirectoryIterator;
 PHPAPI zend_class_entry *spl_ce_FilesystemIterator;
diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c
index 06d344990df..83a19bf638a 100644
--- a/ext/spl/spl_iterators.c
+++ b/ext/spl/spl_iterators.c
@@ -1676,14 +1676,14 @@ PHP_METHOD(RecursiveFilterIterator, getChildren)

 	SPL_FETCH_AND_CHECK_DUAL_IT(intern, ZEND_THIS);

-	zval childrens;
-	zend_call_method_with_0_params(Z_OBJ(intern->inner.zobject), intern->inner.ce, NULL, "getchildren", &childrens);
-	if (Z_TYPE(childrens) == IS_UNDEF) {
+	zval children;
+	zend_call_method_with_0_params(Z_OBJ(intern->inner.zobject), intern->inner.ce, NULL, "getchildren", &children);
+	if (Z_TYPE(children) == IS_UNDEF) {
 		RETURN_THROWS();
 	}

-	zend_result is_initialized = object_init_with_constructor(return_value, Z_OBJCE_P(ZEND_THIS), 1, &childrens, NULL);
-	zval_ptr_dtor(&childrens);
+	zend_result is_initialized = object_init_with_constructor(return_value, Z_OBJCE_P(ZEND_THIS), 1, &children, NULL);
+	zval_ptr_dtor(&children);
 	if (is_initialized == FAILURE) {
 		RETURN_THROWS();
 	}
diff --git a/ext/standard/credits_ext.h b/ext/standard/credits_ext.h
index b22a3f090c4..3e1ba70a71e 100644
--- a/ext/standard/credits_ext.h
+++ b/ext/standard/credits_ext.h
@@ -51,7 +51,7 @@ CREDIT_LINE("PHP hash", "Sara Golemon, Rasmus Lerdorf, Stefan Esser, Michael Wal
 CREDIT_LINE("Posix", "Kristian Koehntopp");
 CREDIT_LINE("PostgreSQL driver for PDO", "Edin Kadribasic, Ilia Alshanetsky");
 CREDIT_LINE("PostgreSQL", "Jouni Ahto, Zeev Suraski, Yasuo Ohgaki, Chris Kings-Lynne");
-CREDIT_LINE("random", "Go Kudo, Tim Düsterhus, Guilliam Xavier, Christoph M. Becker, Jakub Zelenka, Bob Weinand, Máté Kocsis, and Original RNG implementators");
+CREDIT_LINE("random", "Go Kudo, Tim Düsterhus, Guilliam Xavier, Christoph M. Becker, Jakub Zelenka, Bob Weinand, Máté Kocsis, and Original RNG implementers");
 CREDIT_LINE("Readline", "Thies C. Arntzen");
 CREDIT_LINE("Reflection", "Marcus Boerger, Timm Friebe, George Schlossnagle, Andrei Zmievski, Johannes Schlueter");
 CREDIT_LINE("Sessions", "Sascha Schumann, Andrei Zmievski");
diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c
index a03aed1ccdd..90341109210 100644
--- a/ext/standard/streamsfuncs.c
+++ b/ext/standard/streamsfuncs.c
@@ -1457,7 +1457,7 @@ PHP_FUNCTION(stream_set_blocking)

 /* }}} */

-/* {{{ Set timeout on stream read to seconds + microseonds */
+/* {{{ Set timeout on stream read to seconds + microseconds */
 #if defined(HAVE_SYS_TIME_H) || defined(PHP_WIN32)
 PHP_FUNCTION(stream_set_timeout)
 {
diff --git a/main/SAPI.c b/main/SAPI.c
index 7de36af440c..c72ea50e0f7 100644
--- a/main/SAPI.c
+++ b/main/SAPI.c
@@ -633,11 +633,11 @@ static void sapi_header_add_op(sapi_header_op_enum op, sapi_header_struct *sapi_
 			char *colon_offset = strchr(sapi_header->header, ':');

 			if (colon_offset) {
-				char sav = *colon_offset;
+				char saved_char = *colon_offset;

 				*colon_offset = 0;
 				sapi_remove_header(&SG(sapi_headers).headers, sapi_header->header, strlen(sapi_header->header), 0);
-				*colon_offset = sav;
+				*colon_offset = saved_char;
 			}
 		}
 		zend_llist_add_element(&SG(sapi_headers).headers, (void *) sapi_header);
diff --git a/main/debug_gdb_scripts.c b/main/debug_gdb_scripts.c
index 6db215f384b..0fb9450388d 100644
Binary files a/main/debug_gdb_scripts.c and b/main/debug_gdb_scripts.c differ
diff --git a/scripts/gdb/php_gdb.py b/scripts/gdb/php_gdb.py
index 1c5da0154ae..b00af63e05a 100644
--- a/scripts/gdb/php_gdb.py
+++ b/scripts/gdb/php_gdb.py
@@ -10,7 +10,7 @@ the PHP binary is in the auto load safe path:
 See https://sourceware.org/gdb/current/onlinedocs/gdb.html/Python-Auto_002dloading.html
 See https://sourceware.org/gdb/current/onlinedocs/gdb.html/Auto_002dloading-safe-path.html#Auto_002dloading-safe-path

-If needed, pretty printers can be by-passed by using the /r flag:
+If needed, pretty printers can be bypassed by using the /r flag:
   (gdb) p /r any_variable

 Use |set print pretty| to enable multi-line printing and indentation: