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.
This commit is contained in:
Noah Webber authored and GitHub committed 2026-09-24 15:56:13 +02:00
1 parent b30219a44a
commit 5a9d50dc61
24 files changed
+37 -37

No files matched your search

+2 -2
View File
@@ -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))) {
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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.
+1 -1
View File
@@ -2413,7 +2413,7 @@ class EvaluatedValue
// 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\"";
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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;
}
+1 -1
View File
@@ -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']));
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -3674,7 +3674,7 @@ file_cache_fallback:
}
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;
+1 -1
View File
@@ -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;
+5 -5
View File
@@ -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));
+1 -1
View File
@@ -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];
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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");
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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));
}
+1 -1
View File
@@ -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;
+5 -5
View File
@@ -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();
}
+1 -1
View File
@@ -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");
+1 -1
View File
@@ -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)
{
+2 -2
View File
@@ -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);
+1 -1
View File
@@ -680,7 +680,7 @@ __asm__(
".ascii \"See https://sourceware.org/gdb/current/onlinedocs/gdb.html/Python-Auto_002dloading.html\\n\"\n"
".ascii \"See https://sourceware.org/gdb/current/onlinedocs/gdb.html/Auto_002dloading-safe-path.html#Auto_002dloading-safe-path\\n\"\n"
".ascii \"\\n\"\n"
".ascii \"If needed, pretty printers can be by-passed by using the /r flag:\\n\"\n"
".ascii \"If needed, pretty printers can be bypassed by using the /r flag:\\n\"\n"
".ascii \" (gdb) p /r any_variable\\n\"\n"
".ascii \"\\n\"\n"
".ascii \"Use |set print pretty| to enable multi-line printing and indentation:\\n\"\n"
+1 -1
View File
@@ -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: