Skip to content

Commit 462da6e

Browse files
jsorefnikic
authored andcommitted
Fix spelling and grammar mistakes
This PR corrects misspellings identified by the check-spelling action. The misspellings have been reported at jsoref/php-src@b6ba3e2#commitcomment-48946465 The action reports that the changes in this PR would make it happy: jsoref/php-src@602417c Closes phpGH-6822.
1 parent 02557e6 commit 462da6e

File tree

106 files changed

+248
-245
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+248
-245
lines changed

Diff for: CODING_STANDARDS.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
This file lists several standards that any programmer adding or changing code in
44
PHP should follow. Since this file was added at a very late stage of the
55
development of PHP v3.0, the code base does not fully follow it, but new
6-
features are going in that general direction. Many sections have been recoded to
6+
features are going in that general direction. Many sections have been rewritten to
77
use these rules.
88

99
## Code implementation

Diff for: NEWS

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ PHP NEWS
7878
- MySQLnd:
7979
. Fixed bug #80761 (PDO uses too much memory). (Nikita)
8080

81-
- Opcache:
81+
- OPcache:
8282
. Added inheritance cache. (Dmitry)
8383

8484
- OpenSSL:

Diff for: TSRM/tsrm_win32.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ TSRM_API int tsrm_win32_access(const char *pathname, int mode)
254254
goto Finished;
255255
}
256256

257-
/* Different identity, we need a new impersontated token as well */
257+
/* Different identity, we need a new impersonated token as well */
258258
if (!TWG(impersonation_token_sid) || !EqualSid(token_sid, TWG(impersonation_token_sid))) {
259259
if (TWG(impersonation_token_sid)) {
260260
free(TWG(impersonation_token_sid));

Diff for: UPGRADING

+4-4
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,12 @@ PHP 8.1 UPGRADE NOTES
113113
- PDO SQLite:
114114
. Integers and floats in results sets will now be returned using native PHP
115115
types. You can restore the previous behavior by enabling the
116-
PDO::ATTR_STRINGFIY_FETCHES option.
116+
PDO::ATTR_STRINGIFY_FETCHES option.
117117

118118
- Standard:
119119
. version_compare() no longer accepts undocumented operator abbreviations.
120120
. htmlspecialchars(), htmlentities(), htmlspecialchars_decode(),
121-
html_entitity_decode() and get_html_translation_table() now use
121+
html_entity_decode() and get_html_translation_table() now use
122122
ENT_QUOTES | ENT_SUBSTITUTE rather than ENT_COMPAT by default. This means
123123
that ' is escaped to ' while previously it was left alone.
124124
Additionally, malformed UTF-8 will be replaced by a Unicode substitution
@@ -187,7 +187,7 @@ PHP 8.1 UPGRADE NOTES
187187
echo $h, "\n";
188188
```
189189

190-
A valid seed value is within the range from 0 to the plaform defined UINT_MAX, usually 4294967295.
190+
A valid seed value is within the range from 0 to the platform defined UINT_MAX, usually 4294967295.
191191

192192
. Added xxHash. The implementation brings in the following arguments
193193

@@ -262,7 +262,7 @@ PHP 8.1 UPGRADE NOTES
262262
etc. was changed. Now properties are naturally ordered according to their
263263
declaration and inheritance. Properties declared in a base class are going
264264
to be before the child properties. This order is consistent with internal
265-
layout of properies in zend_objct structure and repeats the order in
265+
layout of properties in zend_object structure and repeats the order in
266266
default_properties_table[] and properties_info_table[]. The old order was
267267
not documented and was caused by class inheritance implementation details.
268268

Diff for: Zend/Optimizer/block_pass.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1458,7 +1458,7 @@ static void zend_jmp_optimization(zend_basic_block *block, zend_op_array *op_arr
14581458
/* is not used on the following path and */
14591459
/* should be used once on the branch path. */
14601460
/* */
1461-
/* The pattern works well only if jums processed in */
1461+
/* The pattern works well only if jumps processed in */
14621462
/* direct order, otherwise it breaks JMPZ_EX */
14631463
/* sequences too early. */
14641464
last_op->result.var = target->result.var;

Diff for: Zend/Optimizer/dce.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ int dce_optimize_op_array(zend_op_array *op_array, zend_ssa *ssa, bool reorder_d
541541
}
542542
} FOREACH_PHI_END();
543543

544-
/* Mark reacable instruction without side effects as dead */
544+
/* Mark reachable instruction without side effects as dead */
545545
int b = ssa->cfg.blocks_count;
546546
while (b > 0) {
547547
int op_data = -1;

Diff for: Zend/Optimizer/pass1.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx)
111111
|| opline->extended_value == ZEND_DIV
112112
|| opline->extended_value == ZEND_POW) {
113113
if (Z_TYPE(ZEND_OP2_LITERAL(opline)) == IS_STRING) {
114-
/* don't optimise if it should produce a runtime numeric string error */
114+
/* don't optimize if it should produce a runtime numeric string error */
115115
if (is_numeric_string(Z_STRVAL(ZEND_OP2_LITERAL(opline)), Z_STRLEN(ZEND_OP2_LITERAL(opline)), NULL, NULL, 0)) {
116116
convert_scalar_to_number(&ZEND_OP2_LITERAL(opline));
117117
}
@@ -120,7 +120,7 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx)
120120
|| opline->extended_value == ZEND_SL
121121
|| opline->extended_value == ZEND_SR) {
122122
if (Z_TYPE(ZEND_OP2_LITERAL(opline)) != IS_LONG) {
123-
/* don't optimise if it should produce a runtime numeric string error */
123+
/* don't optimize if it should produce a runtime numeric string error */
124124
if (!(Z_TYPE(ZEND_OP2_LITERAL(opline)) == IS_STRING
125125
&& !is_numeric_string(Z_STRVAL(ZEND_OP2_LITERAL(opline)), Z_STRLEN(ZEND_OP2_LITERAL(opline)), NULL, NULL, 0))) {
126126
convert_to_long(&ZEND_OP2_LITERAL(opline));
@@ -311,7 +311,7 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx)
311311
}
312312
if (send1_opline->opcode != ZEND_SEND_VAL ||
313313
send1_opline->op1_type != IS_CONST) {
314-
/* don't colllect constants after unknown function call */
314+
/* don't collect constants after unknown function call */
315315
collect_constants = 0;
316316
break;
317317
}
@@ -323,7 +323,7 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx)
323323
}
324324
if (send1_opline->opcode != ZEND_SEND_VAL ||
325325
send1_opline->op1_type != IS_CONST) {
326-
/* don't colllect constants after unknown function call */
326+
/* don't collect constants after unknown function call */
327327
collect_constants = 0;
328328
break;
329329
}
@@ -335,7 +335,7 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx)
335335
if (init_opline->opcode != ZEND_INIT_FCALL ||
336336
init_opline->op2_type != IS_CONST ||
337337
Z_TYPE(ZEND_OP2_LITERAL(init_opline)) != IS_STRING) {
338-
/* don't colllect constants after unknown function call */
338+
/* don't collect constants after unknown function call */
339339
collect_constants = 0;
340340
break;
341341
}
@@ -504,7 +504,7 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx)
504504
break;
505505
}
506506
}
507-
/* don't colllect constants after any other function call */
507+
/* don't collect constants after any other function call */
508508
collect_constants = 0;
509509
break;
510510
}

Diff for: Zend/Optimizer/pass3.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ void zend_optimizer_pass3(zend_op_array *op_array, zend_optimizer_ctx *ctx)
261261
/* is not used on the following path and */
262262
/* should be used once on the branch path. */
263263
/* */
264-
/* The pattern works well only if jums processed in */
264+
/* The pattern works well only if jumps processed in */
265265
/* direct order, otherwise it breaks JMPZ_EX */
266266
/* sequences too early. */
267267
opline->result.var = target->result.var;

Diff for: Zend/Optimizer/zend_call_graph.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ struct _zend_call_info {
4545
struct _zend_func_info {
4646
int num;
4747
uint32_t flags;
48-
zend_ssa ssa; /* Static Single Assignmnt Form */
48+
zend_ssa ssa; /* Static Single Assignment Form */
4949
zend_call_info *caller_info; /* where this function is called from */
5050
zend_call_info *callee_info; /* which functions are called from this one */
5151
zend_call_info **call_map; /* Call info associated with init/call/send opnum */

Diff for: Zend/Optimizer/zend_dump.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,7 @@ ZEND_API void zend_dump_op_array(const zend_op_array *op_array, uint32_t dump_fl
926926
}
927927
}
928928
if (func_flags & ZEND_FUNC_IRREDUCIBLE) {
929-
fprintf(stderr, ", irreducable");
929+
fprintf(stderr, ", irreducible");
930930
}
931931
if (func_flags & ZEND_FUNC_NO_LOOPS) {
932932
fprintf(stderr, ", no_loops");

Diff for: Zend/Optimizer/zend_inference.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -3790,7 +3790,7 @@ static bool is_effective_op2_double_cast(zend_op *opline, zval *op1) {
37903790
* E.g. 0+$i and 0.0+$i only differ by that cast. If then the consuming instruction of this
37913791
* result will perform a double cast anyway, the conversion is safe.
37923792
*
3793-
* The checks happens recursively, while keeping track of which variables are already visisted to
3793+
* The checks happens recursively, while keeping track of which variables are already visited to
37943794
* avoid infinite loops. An iterative, worklist driven approach would be possible, but the state
37953795
* management more cumbersome to implement, so we don't bother for now.
37963796
*/

Diff for: Zend/Optimizer/zend_optimizer_internal.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ zend_function *zend_optimizer_get_called_func(
113113
uint32_t zend_optimizer_classify_function(zend_string *name, uint32_t num_args);
114114
void zend_optimizer_migrate_jump(zend_op_array *op_array, zend_op *new_opline, zend_op *opline);
115115
void zend_optimizer_shift_jump(zend_op_array *op_array, zend_op *opline, uint32_t *shiftlist);
116-
int sccp_optimize_op_array(zend_optimizer_ctx *ctx, zend_op_array *op_arrya, zend_ssa *ssa, zend_call_info **call_map);
116+
int sccp_optimize_op_array(zend_optimizer_ctx *ctx, zend_op_array *op_array, zend_ssa *ssa, zend_call_info **call_map);
117117
int dce_optimize_op_array(zend_op_array *op_array, zend_ssa *ssa, bool reorder_dtor_effects);
118118
int zend_ssa_escape_analysis(const zend_script *script, zend_op_array *op_array, zend_ssa *ssa);
119119

Diff for: Zend/tests/list/list_reference_010.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
list(&$foo) = [42];
66
?>
77
--EXPECTF--
8-
Fatal error: Cannot assign reference to non referencable value in %s on line %d
8+
Fatal error: Cannot assign reference to non referenceable value in %s on line %d

Diff for: Zend/tests/list/list_reference_011.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ const FOO = 10;
66
[&$f] = FOO;
77
?>
88
--EXPECTF--
9-
Fatal error: Cannot assign reference to non referencable value in %s on line %d
9+
Fatal error: Cannot assign reference to non referenceable value in %s on line %d

Diff for: Zend/tests/restrict_globals/invalid_assign_list_ref.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ list(&$GLOBALS) = [1];
77

88
?>
99
--EXPECTF--
10-
Fatal error: Cannot assign reference to non referencable value in %s on line %d
10+
Fatal error: Cannot assign reference to non referenceable value in %s on line %d

Diff for: Zend/zend.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -931,7 +931,7 @@ void zend_startup(zend_utility_functions *utility_functions) /* {{{ */
931931
#endif
932932
# if ZEND_MAP_PTR_KIND == ZEND_MAP_PTR_KIND_PTR
933933
/* Create a map region, used for indirect pointers from shared to
934-
* process memory. It's allocatred once and never resized.
934+
* process memory. It's allocated once and never resized.
935935
* All processes must map it into the same address space.
936936
*/
937937
CG(map_ptr_size) = 1024 * 1024; // TODO: initial size ???
@@ -1374,8 +1374,8 @@ static ZEND_COLD void zend_error_impl(
13741374
ZVAL_COPY_VALUE(&orig_user_error_handler, &EG(user_error_handler));
13751375
ZVAL_UNDEF(&EG(user_error_handler));
13761376

1377-
/* User error handler may include() additinal PHP files.
1378-
* If an error was generated during comilation PHP will compile
1377+
/* User error handler may include() additional PHP files.
1378+
* If an error was generated during compilation PHP will compile
13791379
* such scripts recursively, but some CG() variables may be
13801380
* inconsistent. */
13811381

Diff for: Zend/zend_API.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2900,7 +2900,7 @@ void module_destructor(zend_module_entry *module) /* {{{ */
29002900
zend_unregister_ini_entries(module->module_number);
29012901
}
29022902

2903-
/* Deinitilaise module globals */
2903+
/* Deinitialize module globals */
29042904
if (module->globals_size) {
29052905
#ifdef ZTS
29062906
if (*module->globals_id_ptr) {

Diff for: Zend/zend_API.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ ZEND_API void zend_fcall_info_args_clear(zend_fcall_info *fci, bool free_mem);
590590
*/
591591
ZEND_API void zend_fcall_info_args_save(zend_fcall_info *fci, uint32_t *param_count, zval **params);
592592

593-
/** Free arguments connected with zend_fcall_info *fci andset back saved ones.
593+
/** Free arguments connected with zend_fcall_info *fci and set back saved ones.
594594
*/
595595
ZEND_API void zend_fcall_info_args_restore(zend_fcall_info *fci, uint32_t param_count, zval *params);
596596

Diff for: Zend/zend_alloc.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ int zend_mm_use_huge_pages = 0;
210210
* free_tail - number of continuous free pages at the end of chunk
211211
*
212212
* free_map - bitset (a bit for each page). The bit is set if the corresponding
213-
* page is allocated. Allocator for "lage sizes" may easily find a
213+
* page is allocated. Allocator for "large sizes" may easily find a
214214
* free page (or a continuous number of pages) searching for zero
215215
* bits.
216216
*

Diff for: Zend/zend_builtin_functions.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1936,7 +1936,7 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int
19361936
_zend_hash_append_ex(stack_frame, ZSTR_KNOWN(ZEND_STR_LINE), &tmp, 1);
19371937

19381938
/* try to fetch args only if an FCALL was just made - elsewise we're in the middle of a function
1939-
* and debug_baktrace() might have been called by the error_handler. in this case we don't
1939+
* and debug_backtrace() might have been called by the error_handler. in this case we don't
19401940
* want to pop anything of the argument-stack */
19411941
} else {
19421942
zend_execute_data *prev_call = skip;

Diff for: Zend/zend_compile.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ static int zend_add_ns_func_name_literal(zend_string *name) /* {{{ */
586586
zend_string *lc_name = zend_string_tolower(name);
587587
zend_add_literal_string(&lc_name);
588588

589-
/* Lowercased unqualfied name */
589+
/* Lowercased unqualified name */
590590
if (zend_get_unqualified_name(name, &unqualified_name, &unqualified_name_len)) {
591591
lc_name = zend_string_alloc(unqualified_name_len, 0);
592592
zend_str_tolower_copy(ZSTR_VAL(lc_name), unqualified_name, unqualified_name_len);
@@ -715,7 +715,7 @@ void zend_do_free(znode *op1) /* {{{ */
715715
switch (opline->opcode) {
716716
case ZEND_BOOL:
717717
case ZEND_BOOL_NOT:
718-
/* boolean resuls don't have to be freed */
718+
/* boolean results don't have to be freed */
719719
return;
720720
case ZEND_POST_INC_STATIC_PROP:
721721
case ZEND_POST_DEC_STATIC_PROP:
@@ -3234,7 +3234,7 @@ void zend_compile_assign(znode *result, zend_ast *ast) /* {{{ */
32343234
if (zend_propagate_list_refs(var_ast)) {
32353235
if (!zend_is_variable_or_call(expr_ast)) {
32363236
zend_error_noreturn(E_COMPILE_ERROR,
3237-
"Cannot assign reference to non referencable value");
3237+
"Cannot assign reference to non referenceable value");
32383238
}
32393239

32403240
zend_compile_var(&expr_node, expr_ast, BP_VAR_W, 1);

Diff for: Zend/zend_compile.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ typedef struct _zend_oparray_context {
233233
/* op_array or class is preloaded | | | */
234234
#define ZEND_ACC_PRELOADED (1 << 10) /* X | X | | */
235235
/* | | | */
236-
/* Flag to differenciate cases from constants. | | | */
236+
/* Flag to differentiate cases from constants. | | | */
237237
/* Stored in Z_ACCESS_FLAGS, must not conflict with | | | */
238238
/* ZEND_ACC_ visibility flags or IS_CONSTANT_VISITED_MARK | | | */
239239
#define ZEND_CLASS_CONST_IS_CASE (1 << 6) /* | | | X */
@@ -1103,15 +1103,15 @@ END_EXTERN_C()
11031103
#define ZEND_COMPILE_EXTENDED_FCALL (1<<1)
11041104
#define ZEND_COMPILE_EXTENDED_INFO (ZEND_COMPILE_EXTENDED_STMT|ZEND_COMPILE_EXTENDED_FCALL)
11051105

1106-
/* call op_array handler of extendions */
1106+
/* call op_array handler of extensions */
11071107
#define ZEND_COMPILE_HANDLE_OP_ARRAY (1<<2)
11081108

11091109
/* generate ZEND_INIT_FCALL_BY_NAME for internal functions instead of ZEND_INIT_FCALL */
11101110
#define ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS (1<<3)
11111111

11121112
/* don't perform early binding for classes inherited form internal ones;
11131113
* in namespaces assume that internal class that doesn't exist at compile-time
1114-
* may apper in run-time */
1114+
* may appear in run-time */
11151115
#define ZEND_COMPILE_IGNORE_INTERNAL_CLASSES (1<<4)
11161116

11171117
/* generate ZEND_DECLARE_CLASS_DELAYED opcode to delay early binding */

Diff for: Zend/zend_constants.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ ZEND_API void zend_register_string_constant(const char *name, size_t name_len, c
8585
ZEND_API void zend_register_stringl_constant(const char *name, size_t name_len, const char *strval, size_t strlen, int flags, int module_number);
8686
ZEND_API zend_result zend_register_constant(zend_constant *c);
8787
#ifdef ZTS
88-
void zend_copy_constants(HashTable *target, HashTable *sourc);
88+
void zend_copy_constants(HashTable *target, HashTable *source);
8989
#endif
9090

9191
ZEND_API zend_constant *_zend_get_special_const(const char *name, size_t name_len);

Diff for: Zend/zend_exceptions.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ static zend_object_handlers default_exception_handlers;
5353
/* {{{ zend_implement_throwable */
5454
static int zend_implement_throwable(zend_class_entry *interface, zend_class_entry *class_type)
5555
{
56-
/* zend_ce_exception and zend_ce_error may not be initialized yet when this is caleld (e.g when
56+
/* zend_ce_exception and zend_ce_error may not be initialized yet when this is called (e.g when
5757
* implementing Throwable for Exception itself). Perform a manual inheritance check. */
5858
zend_class_entry *root = class_type;
5959
while (root->parent) {

Diff for: Zend/zend_execute.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ struct _zend_vm_stack {
174174
/*
175175
* In general in RELEASE build ZEND_ASSERT() must be zero-cost, but for some
176176
* reason, GCC generated worse code, performing CSE on assertion code and the
177-
* following "slow path" and moving memory read operatins from slow path into
177+
* following "slow path" and moving memory read operations from slow path into
178178
* common header. This made a degradation for the fast path.
179179
* The following "#if ZEND_DEBUG" eliminates it.
180180
*/

Diff for: Zend/zend_generators.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ ZEND_API void zend_generator_resume(zend_generator *orig_generator) /* {{{ */
708708
orig_generator->flags &= ~ZEND_GENERATOR_DO_INIT;
709709
return;
710710
}
711-
/* If there are no more deletegated values, resume the generator
711+
/* If there are no more delegated values, resume the generator
712712
* after the "yield from" expression. */
713713
}
714714

Diff for: Zend/zend_globals.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ struct _zend_executor_globals {
229229

230230
zend_long assertions;
231231

232-
uint32_t ht_iterators_count; /* number of allocatd slots */
232+
uint32_t ht_iterators_count; /* number of allocated slots */
233233
uint32_t ht_iterators_used; /* number of used slots */
234234
HashTableIterator *ht_iterators;
235235
HashTableIterator ht_iterators_slots[16];

Diff for: Zend/zend_hash.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1842,7 +1842,7 @@ ZEND_API void ZEND_FASTCALL zend_hash_graceful_reverse_destroy(HashTable *ht)
18421842
* return codes are possible:
18431843
* ZEND_HASH_APPLY_KEEP - continue
18441844
* ZEND_HASH_APPLY_STOP - stop iteration
1845-
* ZEND_HASH_APPLY_REMOVE - delete the element, combineable with the former
1845+
* ZEND_HASH_APPLY_REMOVE - delete the element, combinable with the former
18461846
*/
18471847

18481848
ZEND_API void ZEND_FASTCALL zend_hash_apply(HashTable *ht, apply_func_t apply_func)

0 commit comments

Comments
 (0)