diff --git a/CODING_STANDARDS.md b/CODING_STANDARDS.md index 61cbd2f1f4228..5754718e5a3a2 100644 --- a/CODING_STANDARDS.md +++ b/CODING_STANDARDS.md @@ -3,7 +3,7 @@ This file lists several standards that any programmer adding or changing code in PHP should follow. Since this file was added at a very late stage of the development of PHP v3.0, the code base does not fully follow it, but new -features are going in that general direction. Many sections have been recoded to +features are going in that general direction. Many sections have been rewritten to use these rules. ## Code implementation diff --git a/NEWS b/NEWS index 837f6dea519aa..7c2a52e5b7073 100644 --- a/NEWS +++ b/NEWS @@ -41,7 +41,7 @@ PHP NEWS - MySQLnd: . Fixed bug #80761 (PDO uses too much memory). (Nikita) -- Opcache: +- OPcache: . Added inheritance cache. (Dmitry) - OpenSSL: diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c index 23cb31c2fe920..5b9ca2df0c069 100644 --- a/TSRM/tsrm_win32.c +++ b/TSRM/tsrm_win32.c @@ -254,7 +254,7 @@ TSRM_API int tsrm_win32_access(const char *pathname, int mode) goto Finished; } - /* Different identity, we need a new impersontated token as well */ + /* Different identity, we need a new impersonated token as well */ if (!TWG(impersonation_token_sid) || !EqualSid(token_sid, TWG(impersonation_token_sid))) { if (TWG(impersonation_token_sid)) { free(TWG(impersonation_token_sid)); diff --git a/UPGRADING b/UPGRADING index cb2fc7c72e2d1..ec5a0f2507bb8 100644 --- a/UPGRADING +++ b/UPGRADING @@ -113,12 +113,12 @@ PHP 8.1 UPGRADE NOTES - PDO SQLite: . Integers and floats in results sets will now be returned using native PHP types. You can restore the previous behavior by enabling the - PDO::ATTR_STRINGFIY_FETCHES option. + PDO::ATTR_STRINGIFY_FETCHES option. - Standard: . version_compare() no longer accepts undocumented operator abbreviations. . htmlspecialchars(), htmlentities(), htmlspecialchars_decode(), - html_entitity_decode() and get_html_translation_table() now use + html_entity_decode() and get_html_translation_table() now use ENT_QUOTES | ENT_SUBSTITUTE rather than ENT_COMPAT by default. This means that ' is escaped to ' while previously it was left alone. Additionally, malformed UTF-8 will be replaced by a Unicode substitution @@ -187,7 +187,7 @@ PHP 8.1 UPGRADE NOTES echo $h, "\n"; ``` - A valid seed value is within the range from 0 to the plaform defined UINT_MAX, usually 4294967295. + A valid seed value is within the range from 0 to the platform defined UINT_MAX, usually 4294967295. . Added xxHash. The implementation brings in the following arguments @@ -262,7 +262,7 @@ PHP 8.1 UPGRADE NOTES etc. was changed. Now properties are naturally ordered according to their declaration and inheritance. Properties declared in a base class are going to be before the child properties. This order is consistent with internal - layout of properies in zend_objct structure and repeats the order in + layout of properties in zend_object structure and repeats the order in default_properties_table[] and properties_info_table[]. The old order was not documented and was caused by class inheritance implementation details. diff --git a/Zend/Optimizer/block_pass.c b/Zend/Optimizer/block_pass.c index e833ff3dbfd96..c7bfae6d90bc2 100644 --- a/Zend/Optimizer/block_pass.c +++ b/Zend/Optimizer/block_pass.c @@ -1458,7 +1458,7 @@ static void zend_jmp_optimization(zend_basic_block *block, zend_op_array *op_arr /* is not used on the following path and */ /* should be used once on the branch path. */ /* */ - /* The pattern works well only if jums processed in */ + /* The pattern works well only if jumps processed in */ /* direct order, otherwise it breaks JMPZ_EX */ /* sequences too early. */ last_op->result.var = target->result.var; diff --git a/Zend/Optimizer/dce.c b/Zend/Optimizer/dce.c index 940f1b6ee2a4d..7995946a1615e 100644 --- a/Zend/Optimizer/dce.c +++ b/Zend/Optimizer/dce.c @@ -527,7 +527,7 @@ int dce_optimize_op_array(zend_op_array *op_array, zend_ssa *ssa, bool reorder_d ctx.phi_dead = alloca(sizeof(zend_ulong) * ctx.phi_worklist_len); memset(ctx.phi_dead, 0xff, sizeof(zend_ulong) * ctx.phi_worklist_len); - /* Mark reacable instruction without side effects as dead */ + /* Mark reachable instruction without side effects as dead */ int b = ssa->cfg.blocks_count; while (b > 0) { int op_data = -1; diff --git a/Zend/Optimizer/pass1.c b/Zend/Optimizer/pass1.c index 86774afef461b..c05d1c2364e8f 100644 --- a/Zend/Optimizer/pass1.c +++ b/Zend/Optimizer/pass1.c @@ -111,7 +111,7 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx) || opline->extended_value == ZEND_DIV || opline->extended_value == ZEND_POW) { if (Z_TYPE(ZEND_OP2_LITERAL(opline)) == IS_STRING) { - /* don't optimise if it should produce a runtime numeric string error */ + /* don't optimize if it should produce a runtime numeric string error */ if (is_numeric_string(Z_STRVAL(ZEND_OP2_LITERAL(opline)), Z_STRLEN(ZEND_OP2_LITERAL(opline)), NULL, NULL, 0)) { convert_scalar_to_number(&ZEND_OP2_LITERAL(opline)); } @@ -120,7 +120,7 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx) || opline->extended_value == ZEND_SL || opline->extended_value == ZEND_SR) { if (Z_TYPE(ZEND_OP2_LITERAL(opline)) != IS_LONG) { - /* don't optimise if it should produce a runtime numeric string error */ + /* don't optimize if it should produce a runtime numeric string error */ if (!(Z_TYPE(ZEND_OP2_LITERAL(opline)) == IS_STRING && !is_numeric_string(Z_STRVAL(ZEND_OP2_LITERAL(opline)), Z_STRLEN(ZEND_OP2_LITERAL(opline)), NULL, NULL, 0))) { convert_to_long(&ZEND_OP2_LITERAL(opline)); @@ -312,7 +312,7 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx) } if (send1_opline->opcode != ZEND_SEND_VAL || send1_opline->op1_type != IS_CONST) { - /* don't colllect constants after unknown function call */ + /* don't collect constants after unknown function call */ collect_constants = 0; break; } @@ -324,7 +324,7 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx) } if (send1_opline->opcode != ZEND_SEND_VAL || send1_opline->op1_type != IS_CONST) { - /* don't colllect constants after unknown function call */ + /* don't collect constants after unknown function call */ collect_constants = 0; break; } @@ -336,7 +336,7 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx) if (init_opline->opcode != ZEND_INIT_FCALL || init_opline->op2_type != IS_CONST || Z_TYPE(ZEND_OP2_LITERAL(init_opline)) != IS_STRING) { - /* don't colllect constants after unknown function call */ + /* don't collect constants after unknown function call */ collect_constants = 0; break; } @@ -505,7 +505,7 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx) break; } } - /* don't colllect constants after any other function call */ + /* don't collect constants after any other function call */ collect_constants = 0; break; } diff --git a/Zend/Optimizer/pass3.c b/Zend/Optimizer/pass3.c index f98c41848c243..b677c8a6a42aa 100644 --- a/Zend/Optimizer/pass3.c +++ b/Zend/Optimizer/pass3.c @@ -261,7 +261,7 @@ void zend_optimizer_pass3(zend_op_array *op_array, zend_optimizer_ctx *ctx) /* is not used on the following path and */ /* should be used once on the branch path. */ /* */ - /* The pattern works well only if jums processed in */ + /* The pattern works well only if jumps processed in */ /* direct order, otherwise it breaks JMPZ_EX */ /* sequences too early. */ opline->result.var = target->result.var; diff --git a/Zend/Optimizer/zend_call_graph.h b/Zend/Optimizer/zend_call_graph.h index c0699dc031943..70d77bfaed311 100644 --- a/Zend/Optimizer/zend_call_graph.h +++ b/Zend/Optimizer/zend_call_graph.h @@ -45,7 +45,7 @@ struct _zend_call_info { struct _zend_func_info { int num; uint32_t flags; - zend_ssa ssa; /* Static Single Assignmnt Form */ + zend_ssa ssa; /* Static Single Assignment Form */ zend_call_info *caller_info; /* where this function is called from */ zend_call_info *callee_info; /* which functions are called from this one */ zend_call_info **call_map; /* Call info associated with init/call/send opnum */ diff --git a/Zend/Optimizer/zend_dump.c b/Zend/Optimizer/zend_dump.c index e75d059dab7c8..263c326274dee 100644 --- a/Zend/Optimizer/zend_dump.c +++ b/Zend/Optimizer/zend_dump.c @@ -926,7 +926,7 @@ ZEND_API void zend_dump_op_array(const zend_op_array *op_array, uint32_t dump_fl } } if (func_flags & ZEND_FUNC_IRREDUCIBLE) { - fprintf(stderr, ", irreducable"); + fprintf(stderr, ", irreducible"); } if (func_flags & ZEND_FUNC_NO_LOOPS) { fprintf(stderr, ", no_loops"); diff --git a/Zend/Optimizer/zend_inference.c b/Zend/Optimizer/zend_inference.c index 4233a8f7efbb6..6945c069959c0 100644 --- a/Zend/Optimizer/zend_inference.c +++ b/Zend/Optimizer/zend_inference.c @@ -3778,7 +3778,7 @@ static bool is_effective_op2_double_cast(zend_op *opline, zval *op1) { * E.g. 0+$i and 0.0+$i only differ by that cast. If then the consuming instruction of this * result will perform a double cast anyway, the conversion is safe. * - * The checks happens recursively, while keeping track of which variables are already visisted to + * The checks happens recursively, while keeping track of which variables are already visited to * avoid infinite loops. An iterative, worklist driven approach would be possible, but the state * management more cumbersome to implement, so we don't bother for now. */ diff --git a/Zend/Optimizer/zend_optimizer_internal.h b/Zend/Optimizer/zend_optimizer_internal.h index 911eb79e64b1d..2a78ac111212a 100644 --- a/Zend/Optimizer/zend_optimizer_internal.h +++ b/Zend/Optimizer/zend_optimizer_internal.h @@ -113,7 +113,7 @@ zend_function *zend_optimizer_get_called_func( uint32_t zend_optimizer_classify_function(zend_string *name, uint32_t num_args); void zend_optimizer_migrate_jump(zend_op_array *op_array, zend_op *new_opline, zend_op *opline); void zend_optimizer_shift_jump(zend_op_array *op_array, zend_op *opline, uint32_t *shiftlist); -int sccp_optimize_op_array(zend_optimizer_ctx *ctx, zend_op_array *op_arrya, zend_ssa *ssa, zend_call_info **call_map); +int sccp_optimize_op_array(zend_optimizer_ctx *ctx, zend_op_array *op_array, zend_ssa *ssa, zend_call_info **call_map); int dce_optimize_op_array(zend_op_array *op_array, zend_ssa *ssa, bool reorder_dtor_effects); int zend_ssa_escape_analysis(const zend_script *script, zend_op_array *op_array, zend_ssa *ssa); diff --git a/Zend/tests/list/list_reference_010.phpt b/Zend/tests/list/list_reference_010.phpt index 8ceb344a33b7a..708c5eb254783 100644 --- a/Zend/tests/list/list_reference_010.phpt +++ b/Zend/tests/list/list_reference_010.phpt @@ -5,4 +5,4 @@ list(&$foo) = [42]; ?> --EXPECTF-- -Fatal error: Cannot assign reference to non referencable value in %s on line %d +Fatal error: Cannot assign reference to non referenceable value in %s on line %d diff --git a/Zend/tests/list/list_reference_011.phpt b/Zend/tests/list/list_reference_011.phpt index 405f34f22737e..709814b830b3f 100644 --- a/Zend/tests/list/list_reference_011.phpt +++ b/Zend/tests/list/list_reference_011.phpt @@ -6,4 +6,4 @@ const FOO = 10; [&$f] = FOO; ?> --EXPECTF-- -Fatal error: Cannot assign reference to non referencable value in %s on line %d +Fatal error: Cannot assign reference to non referenceable value in %s on line %d diff --git a/Zend/tests/restrict_globals/invalid_assign_list_ref.phpt b/Zend/tests/restrict_globals/invalid_assign_list_ref.phpt index 594a308ea1afe..dd41189878374 100644 --- a/Zend/tests/restrict_globals/invalid_assign_list_ref.phpt +++ b/Zend/tests/restrict_globals/invalid_assign_list_ref.phpt @@ -7,4 +7,4 @@ list(&$GLOBALS) = [1]; ?> --EXPECTF-- -Fatal error: Cannot assign reference to non referencable value in %s on line %d +Fatal error: Cannot assign reference to non referenceable value in %s on line %d diff --git a/Zend/zend.c b/Zend/zend.c index c76a7e6fba6ed..e95266f3b635f 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -931,7 +931,7 @@ void zend_startup(zend_utility_functions *utility_functions) /* {{{ */ #endif # if ZEND_MAP_PTR_KIND == ZEND_MAP_PTR_KIND_PTR /* Create a map region, used for indirect pointers from shared to - * process memory. It's allocatred once and never resized. + * process memory. It's allocated once and never resized. * All processes must map it into the same address space. */ CG(map_ptr_size) = 1024 * 1024; // TODO: initial size ??? @@ -1374,8 +1374,8 @@ static ZEND_COLD void zend_error_impl( ZVAL_COPY_VALUE(&orig_user_error_handler, &EG(user_error_handler)); ZVAL_UNDEF(&EG(user_error_handler)); - /* User error handler may include() additinal PHP files. - * If an error was generated during comilation PHP will compile + /* User error handler may include() additional PHP files. + * If an error was generated during compilation PHP will compile * such scripts recursively, but some CG() variables may be * inconsistent. */ diff --git a/Zend/zend_API.c b/Zend/zend_API.c index ca6214ea1fa03..5dcdb642a3eec 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -2899,7 +2899,7 @@ void module_destructor(zend_module_entry *module) /* {{{ */ zend_unregister_ini_entries(module->module_number); } - /* Deinitilaise module globals */ + /* Deinitialize module globals */ if (module->globals_size) { #ifdef ZTS if (*module->globals_id_ptr) { diff --git a/Zend/zend_API.h b/Zend/zend_API.h index 8072befb030a3..50764faeca367 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -590,7 +590,7 @@ ZEND_API void zend_fcall_info_args_clear(zend_fcall_info *fci, bool free_mem); */ ZEND_API void zend_fcall_info_args_save(zend_fcall_info *fci, uint32_t *param_count, zval **params); -/** Free arguments connected with zend_fcall_info *fci andset back saved ones. +/** Free arguments connected with zend_fcall_info *fci and set back saved ones. */ ZEND_API void zend_fcall_info_args_restore(zend_fcall_info *fci, uint32_t param_count, zval *params); diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c index 10e739c0ee995..ae7d7a9c6736c 100644 --- a/Zend/zend_alloc.c +++ b/Zend/zend_alloc.c @@ -210,7 +210,7 @@ int zend_mm_use_huge_pages = 0; * free_tail - number of continuous free pages at the end of chunk * * free_map - bitset (a bit for each page). The bit is set if the corresponding - * page is allocated. Allocator for "lage sizes" may easily find a + * page is allocated. Allocator for "large sizes" may easily find a * free page (or a continuous number of pages) searching for zero * bits. * diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 9b4721dbff21f..00d6817d7aff9 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -1922,7 +1922,7 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int zend_hash_add_new(Z_ARRVAL(stack_frame), ZSTR_KNOWN(ZEND_STR_LINE), &tmp); /* try to fetch args only if an FCALL was just made - elsewise we're in the middle of a function - * and debug_baktrace() might have been called by the error_handler. in this case we don't + * and debug_backtrace() might have been called by the error_handler. in this case we don't * want to pop anything of the argument-stack */ } else { zend_execute_data *prev_call = skip; diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index ff72d7d528166..dc9cf9079f100 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -586,7 +586,7 @@ static int zend_add_ns_func_name_literal(zend_string *name) /* {{{ */ zend_string *lc_name = zend_string_tolower(name); zend_add_literal_string(&lc_name); - /* Lowercased unqualfied name */ + /* Lowercased unqualified name */ if (zend_get_unqualified_name(name, &unqualified_name, &unqualified_name_len)) { lc_name = zend_string_alloc(unqualified_name_len, 0); zend_str_tolower_copy(ZSTR_VAL(lc_name), unqualified_name, unqualified_name_len); @@ -715,7 +715,7 @@ void zend_do_free(znode *op1) /* {{{ */ switch (opline->opcode) { case ZEND_BOOL: case ZEND_BOOL_NOT: - /* boolean resuls don't have to be freed */ + /* boolean results don't have to be freed */ return; case ZEND_POST_INC_STATIC_PROP: case ZEND_POST_DEC_STATIC_PROP: @@ -3230,7 +3230,7 @@ void zend_compile_assign(znode *result, zend_ast *ast) /* {{{ */ if (zend_propagate_list_refs(var_ast)) { if (!zend_is_variable_or_call(expr_ast)) { zend_error_noreturn(E_COMPILE_ERROR, - "Cannot assign reference to non referencable value"); + "Cannot assign reference to non referenceable value"); } zend_compile_var(&expr_node, expr_ast, BP_VAR_W, 1); diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index 9e22837d61582..3e23e21cf9060 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -233,7 +233,7 @@ typedef struct _zend_oparray_context { /* op_array or class is preloaded | | | */ #define ZEND_ACC_PRELOADED (1 << 10) /* X | X | | */ /* | | | */ -/* Flag to differenciate cases from constants. | | | */ +/* Flag to differentiate cases from constants. | | | */ /* Stored in Z_ACCESS_FLAGS, must not conflict with | | | */ /* ZEND_ACC_ visibility flags or IS_CONSTANT_VISITED_MARK | | | */ #define ZEND_CLASS_CONST_IS_CASE (1 << 6) /* | | | X */ @@ -1103,7 +1103,7 @@ END_EXTERN_C() #define ZEND_COMPILE_EXTENDED_FCALL (1<<1) #define ZEND_COMPILE_EXTENDED_INFO (ZEND_COMPILE_EXTENDED_STMT|ZEND_COMPILE_EXTENDED_FCALL) -/* call op_array handler of extendions */ +/* call op_array handler of extensions */ #define ZEND_COMPILE_HANDLE_OP_ARRAY (1<<2) /* generate ZEND_INIT_FCALL_BY_NAME for internal functions instead of ZEND_INIT_FCALL */ @@ -1111,7 +1111,7 @@ END_EXTERN_C() /* don't perform early binding for classes inherited form internal ones; * in namespaces assume that internal class that doesn't exist at compile-time - * may apper in run-time */ + * may appear in run-time */ #define ZEND_COMPILE_IGNORE_INTERNAL_CLASSES (1<<4) /* generate ZEND_DECLARE_CLASS_DELAYED opcode to delay early binding */ diff --git a/Zend/zend_constants.h b/Zend/zend_constants.h index 07235144470d4..30629eeb23e49 100644 --- a/Zend/zend_constants.h +++ b/Zend/zend_constants.h @@ -84,7 +84,7 @@ ZEND_API void zend_register_string_constant(const char *name, size_t name_len, c 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); ZEND_API zend_result zend_register_constant(zend_constant *c); #ifdef ZTS -void zend_copy_constants(HashTable *target, HashTable *sourc); +void zend_copy_constants(HashTable *target, HashTable *source); #endif ZEND_API zend_constant *_zend_get_special_const(const char *name, size_t name_len); diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index af71ac7a6589b..15ab3aac61eb3 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -53,7 +53,7 @@ static zend_object_handlers default_exception_handlers; /* {{{ zend_implement_throwable */ static int zend_implement_throwable(zend_class_entry *interface, zend_class_entry *class_type) { - /* zend_ce_exception and zend_ce_error may not be initialized yet when this is caleld (e.g when + /* zend_ce_exception and zend_ce_error may not be initialized yet when this is called (e.g when * implementing Throwable for Exception itself). Perform a manual inheritance check. */ zend_class_entry *root = class_type; while (root->parent) { diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h index 628b6ddec5ec9..2a0daa15aff79 100644 --- a/Zend/zend_execute.h +++ b/Zend/zend_execute.h @@ -174,7 +174,7 @@ struct _zend_vm_stack { /* * In general in RELEASE build ZEND_ASSERT() must be zero-cost, but for some * reason, GCC generated worse code, performing CSE on assertion code and the - * following "slow path" and moving memory read operatins from slow path into + * following "slow path" and moving memory read operations from slow path into * common header. This made a degradation for the fast path. * The following "#if ZEND_DEBUG" eliminates it. */ diff --git a/Zend/zend_generators.c b/Zend/zend_generators.c index df94446d6f451..68fbec6c487f4 100644 --- a/Zend/zend_generators.c +++ b/Zend/zend_generators.c @@ -708,7 +708,7 @@ ZEND_API void zend_generator_resume(zend_generator *orig_generator) /* {{{ */ orig_generator->flags &= ~ZEND_GENERATOR_DO_INIT; return; } - /* If there are no more deletegated values, resume the generator + /* If there are no more delegated values, resume the generator * after the "yield from" expression. */ } diff --git a/Zend/zend_globals.h b/Zend/zend_globals.h index 6ea35f3f36517..dce548d79e35f 100644 --- a/Zend/zend_globals.h +++ b/Zend/zend_globals.h @@ -229,7 +229,7 @@ struct _zend_executor_globals { zend_long assertions; - uint32_t ht_iterators_count; /* number of allocatd slots */ + uint32_t ht_iterators_count; /* number of allocated slots */ uint32_t ht_iterators_used; /* number of used slots */ HashTableIterator *ht_iterators; HashTableIterator ht_iterators_slots[16]; diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c index e52939b1eb519..d71e97af3cf81 100644 --- a/Zend/zend_hash.c +++ b/Zend/zend_hash.c @@ -1842,7 +1842,7 @@ ZEND_API void ZEND_FASTCALL zend_hash_graceful_reverse_destroy(HashTable *ht) * return codes are possible: * ZEND_HASH_APPLY_KEEP - continue * ZEND_HASH_APPLY_STOP - stop iteration - * ZEND_HASH_APPLY_REMOVE - delete the element, combineable with the former + * ZEND_HASH_APPLY_REMOVE - delete the element, combinable with the former */ ZEND_API void ZEND_FASTCALL zend_hash_apply(HashTable *ht, apply_func_t apply_func) diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index 2efdf38092e0a..00d847d6b1a97 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -297,7 +297,7 @@ static bool unlinked_instanceof(zend_class_entry *ce1, zend_class_entry *ce2) { zend_class_entry *ce = zend_lookup_class_ex( ce1->interface_names[i].name, ce1->interface_names[i].lc_name, ZEND_FETCH_CLASS_ALLOW_UNLINKED | ZEND_FETCH_CLASS_NO_AUTOLOAD); - /* Avoid recursing if class implements ifself. */ + /* Avoid recursing if class implements itself. */ if (ce && ce != ce1 && unlinked_instanceof(ce, ce2)) { return 1; } @@ -1730,7 +1730,7 @@ static void zend_traits_copy_functions(zend_string *fnname, zend_function *fn, z ) { fn_copy = *fn; - /* if it is 0, no modifieres has been changed */ + /* if it is 0, no modifiers have been changed */ if (alias->modifiers) { fn_copy.common.fn_flags = alias->modifiers | (fn->common.fn_flags & ~ZEND_ACC_PPP_MASK); } @@ -1984,11 +1984,11 @@ static void zend_do_traits_method_binding(zend_class_entry *ce, zend_class_entry } /* }}} */ -static zend_class_entry* find_first_definition(zend_class_entry *ce, zend_class_entry **traits, size_t current_trait, zend_string *prop_name, zend_class_entry *coliding_ce) /* {{{ */ +static zend_class_entry* find_first_definition(zend_class_entry *ce, zend_class_entry **traits, size_t current_trait, zend_string *prop_name, zend_class_entry *colliding_ce) /* {{{ */ { size_t i; - if (coliding_ce == ce) { + if (colliding_ce == ce) { for (i = 0; i < current_trait; i++) { if (traits[i] && zend_hash_exists(&traits[i]->properties_info, prop_name)) { @@ -1997,7 +1997,7 @@ static zend_class_entry* find_first_definition(zend_class_entry *ce, zend_class_ } } - return coliding_ce; + return colliding_ce; } /* }}} */ @@ -2005,7 +2005,7 @@ static void zend_do_traits_property_binding(zend_class_entry *ce, zend_class_ent { size_t i; zend_property_info *property_info; - zend_property_info *coliding_prop; + zend_property_info *colliding_prop; zend_property_info *new_prop; zend_string* prop_name; bool not_compatible; @@ -2025,28 +2025,28 @@ static void zend_do_traits_property_binding(zend_class_entry *ce, zend_class_ent uint32_t flags = property_info->flags; /* next: check for conflicts with current class */ - if ((coliding_prop = zend_hash_find_ptr(&ce->properties_info, prop_name)) != NULL) { - if ((coliding_prop->flags & ZEND_ACC_PRIVATE) && coliding_prop->ce != ce) { + if ((colliding_prop = zend_hash_find_ptr(&ce->properties_info, prop_name)) != NULL) { + if ((colliding_prop->flags & ZEND_ACC_PRIVATE) && colliding_prop->ce != ce) { zend_hash_del(&ce->properties_info, prop_name); flags |= ZEND_ACC_CHANGED; } else { not_compatible = 1; - if ((coliding_prop->flags & (ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC)) + if ((colliding_prop->flags & (ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC)) == (flags & (ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC)) && - property_types_compatible(property_info, coliding_prop) == INHERITANCE_SUCCESS + property_types_compatible(property_info, colliding_prop) == INHERITANCE_SUCCESS ) { /* the flags are identical, thus, the properties may be compatible */ zval *op1, *op2; zval op1_tmp, op2_tmp; if (flags & ZEND_ACC_STATIC) { - op1 = &ce->default_static_members_table[coliding_prop->offset]; + op1 = &ce->default_static_members_table[colliding_prop->offset]; op2 = &traits[i]->default_static_members_table[property_info->offset]; ZVAL_DEINDIRECT(op1); ZVAL_DEINDIRECT(op2); } else { - op1 = &ce->default_properties_table[OBJ_PROP_TO_NUM(coliding_prop->offset)]; + op1 = &ce->default_properties_table[OBJ_PROP_TO_NUM(colliding_prop->offset)]; op2 = &traits[i]->default_properties_table[OBJ_PROP_TO_NUM(property_info->offset)]; } @@ -2075,7 +2075,7 @@ static void zend_do_traits_property_binding(zend_class_entry *ce, zend_class_ent if (not_compatible) { zend_error_noreturn(E_COMPILE_ERROR, "%s and %s define the same property ($%s) in the composition of %s. However, the definition differs and is considered incompatible. Class was composed", - ZSTR_VAL(find_first_definition(ce, traits, i, prop_name, coliding_prop->ce)->name), + ZSTR_VAL(find_first_definition(ce, traits, i, prop_name, colliding_prop->ce)->name), ZSTR_VAL(property_info->ce->name), ZSTR_VAL(prop_name), ZSTR_VAL(ce->name)); @@ -2118,7 +2118,7 @@ static void zend_do_bind_traits(zend_class_entry *ce, zend_class_entry **traits) ZEND_ASSERT(ce->num_traits > 0); - /* complete initialization of trait strutures in ce */ + /* complete initialization of trait structures in ce */ zend_traits_init_trait_structures(ce, traits, &exclude_tables, &aliases); /* first care about all methods to be flattened into the class */ @@ -2132,7 +2132,7 @@ static void zend_do_bind_traits(zend_class_entry *ce, zend_class_entry **traits) efree(exclude_tables); } - /* then flatten the properties into it, to, mostly to notfiy developer about problems */ + /* then flatten the properties into it, to, mostly to notify developer about problems */ zend_do_traits_property_binding(ce, traits); } /* }}} */ diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y index 54ec8eab25490..fcbdcb622261b 100644 --- a/Zend/zend_language_parser.y +++ b/Zend/zend_language_parser.y @@ -250,8 +250,8 @@ static YYSIZE_T zend_yytnamerr(char*, const char*); %type new_expr anonymous_class class_name class_name_reference simple_variable %type internal_functions_in_yacc %type exit_expr scalar backticks_expr lexical_var function_call member_name property_name -%type variable_class_name dereferencable_scalar constant class_constant -%type fully_dereferencable array_object_dereferencable +%type variable_class_name dereferenceable_scalar constant class_constant +%type fully_dereferenceable array_object_dereferenceable %type callable_expr callable_variable static_member new_variable %type encaps_var encaps_var_offset isset_variables %type top_statement_list use_declarations const_list inner_statement_list if_stmt @@ -1262,7 +1262,7 @@ ctor_arguments: ; -dereferencable_scalar: +dereferenceable_scalar: T_ARRAY '(' array_pair_list ')' { $$ = $3; $$->attr = ZEND_ARRAY_SYNTAX_LONG; } | '[' array_pair_list ']' { $$ = $2; $$->attr = ZEND_ARRAY_SYNTAX_SHORT; } | T_CONSTANT_ENCAPSED_STRING { $$ = $1; } @@ -1276,7 +1276,7 @@ scalar: | T_START_HEREDOC T_END_HEREDOC { $$ = zend_ast_create_zval_from_str(ZSTR_EMPTY_ALLOC()); } | T_START_HEREDOC encaps_list T_END_HEREDOC { $$ = $2; } - | dereferencable_scalar { $$ = $1; } + | dereferenceable_scalar { $$ = $1; } | constant { $$ = $1; } | class_constant { $$ = $1; } ; @@ -1306,37 +1306,37 @@ optional_expr: ; variable_class_name: - fully_dereferencable { $$ = $1; } + fully_dereferenceable { $$ = $1; } ; -fully_dereferencable: +fully_dereferenceable: variable { $$ = $1; } | '(' expr ')' { $$ = $2; } - | dereferencable_scalar { $$ = $1; } + | dereferenceable_scalar { $$ = $1; } | class_constant { $$ = $1; } ; -array_object_dereferencable: - fully_dereferencable { $$ = $1; } +array_object_dereferenceable: + fully_dereferenceable { $$ = $1; } | constant { $$ = $1; } ; callable_expr: callable_variable { $$ = $1; } | '(' expr ')' { $$ = $2; } - | dereferencable_scalar { $$ = $1; } + | dereferenceable_scalar { $$ = $1; } ; callable_variable: simple_variable { $$ = zend_ast_create(ZEND_AST_VAR, $1); } - | array_object_dereferencable '[' optional_expr ']' + | array_object_dereferenceable '[' optional_expr ']' { $$ = zend_ast_create(ZEND_AST_DIM, $1, $3); } - | array_object_dereferencable '{' expr '}' + | array_object_dereferenceable '{' expr '}' { $$ = zend_ast_create_ex(ZEND_AST_DIM, ZEND_DIM_ALTERNATIVE_SYNTAX, $1, $3); } - | array_object_dereferencable T_OBJECT_OPERATOR property_name argument_list + | array_object_dereferenceable T_OBJECT_OPERATOR property_name argument_list { $$ = zend_ast_create(ZEND_AST_METHOD_CALL, $1, $3, $4); } - | array_object_dereferencable T_NULLSAFE_OBJECT_OPERATOR property_name argument_list + | array_object_dereferenceable T_NULLSAFE_OBJECT_OPERATOR property_name argument_list { $$ = zend_ast_create(ZEND_AST_NULLSAFE_METHOD_CALL, $1, $3, $4); } | function_call { $$ = $1; } ; @@ -1346,9 +1346,9 @@ variable: { $$ = $1; } | static_member { $$ = $1; } - | array_object_dereferencable T_OBJECT_OPERATOR property_name + | array_object_dereferenceable T_OBJECT_OPERATOR property_name { $$ = zend_ast_create(ZEND_AST_PROP, $1, $3); } - | array_object_dereferencable T_NULLSAFE_OBJECT_OPERATOR property_name + | array_object_dereferenceable T_NULLSAFE_OBJECT_OPERATOR property_name { $$ = zend_ast_create(ZEND_AST_NULLSAFE_PROP, $1, $3); } ; diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index f10e2c58a6bad..7c1d87bae6286 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -742,7 +742,7 @@ ZEND_API zval *zend_std_write_property(zend_object *zobj, zend_string *name, zva goto exit; } if (Z_PROP_FLAG_P(variable_ptr) == IS_PROP_UNINIT) { - /* Writes to uninitializde typed properties bypass __set(). */ + /* Writes to uninitialized typed properties bypass __set(). */ Z_PROP_FLAG_P(variable_ptr) = 0; goto write_std_property; } diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index db53c71317a4d..c6785900469b8 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -716,7 +716,7 @@ ZEND_API void ZEND_FASTCALL convert_to_array(zval *op) /* {{{ */ } else if (Z_OBJ_P(op)->properties == NULL && Z_OBJ_HT_P(op)->get_properties_for == NULL && Z_OBJ_HT_P(op)->get_properties == zend_std_get_properties) { - /* Optimized version without rebulding properties HashTable */ + /* Optimized version without rebuilding properties HashTable */ HashTable *ht = zend_std_build_object_properties_array(Z_OBJ_P(op)); OBJ_RELEASE(Z_OBJ_P(op)); ZVAL_ARR(op, ht); @@ -2965,7 +2965,7 @@ ZEND_API int ZEND_FASTCALL zendi_smart_strcmp(zend_string *s1, zend_string *s2) #else if (oflow1 != 0 && oflow1 == oflow2 && dval1 - dval2 == 0.) { #endif - /* both values are integers overflown to the same side, and the + /* both values are integers overflowed to the same side, and the * double comparison may have resulted in crucial accuracy lost */ goto string_cmp; } diff --git a/Zend/zend_signal.c b/Zend/zend_signal.c index af3ef8cbc6d7c..d8ed5ff0680e8 100644 --- a/Zend/zend_signal.c +++ b/Zend/zend_signal.c @@ -63,7 +63,7 @@ static void zend_signal_handler(int signo, siginfo_t *siginfo, void *context); static int zend_signal_register(int signo, void (*handler)(int, siginfo_t*, void*)); #if defined(__CYGWIN__) || defined(__PASE__) -/* Matches zend_excute_API.c; these platforms don't support ITIMER_PROF. */ +/* Matches zend_execute_API.c; these platforms don't support ITIMER_PROF. */ #define TIMEOUT_SIG SIGALRM #else #define TIMEOUT_SIG SIGPROF @@ -118,7 +118,7 @@ void zend_signal_handler_defer(int signo, siginfo_t *siginfo, void *context) } else { /* delay signal handling */ SIGG(blocked) = 1; /* signal is blocked */ - if ((queue = SIGG(pavail))) { /* if none available it's simply forgotton */ + if ((queue = SIGG(pavail))) { /* if none available it's simply forgotten */ SIGG(pavail) = queue->next; queue->zend_signal.signo = signo; queue->zend_signal.siginfo = siginfo; diff --git a/Zend/zend_strtod.c b/Zend/zend_strtod.c index 9173a15031974..98ca9280950fa 100644 --- a/Zend/zend_strtod.c +++ b/Zend/zend_strtod.c @@ -4213,7 +4213,7 @@ zend_dtoa * * Perhaps we should just compute leading 28 bits of S once * and for all and pass them and a shift to quorem, so it - * can do shifts and ors to compute the numerator for q. + * can do shifts and ORs to compute the numerator for q. */ i = dshift(S, s2); b2 += i; diff --git a/Zend/zend_virtual_cwd.c b/Zend/zend_virtual_cwd.c index 71f9781442642..d2a7e2692bf5e 100644 --- a/Zend/zend_virtual_cwd.c +++ b/Zend/zend_virtual_cwd.c @@ -943,7 +943,7 @@ static size_t tsrm_realpath_r(char *path, size_t start, size_t len, int *ll, tim if (i <= start + 1) { j = start; } else { - /* some leading directories may be unaccessable */ + /* some leading directories may be inaccessible */ j = tsrm_realpath_r(path, start, i-1, ll, t, save ? CWD_FILEPATH : use_realpath, 1, NULL); if (j > start && j != (size_t)-1) { path[j++] = DEFAULT_SLASH; diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 115279dcfde5b..dd55451929119 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -6147,7 +6147,7 @@ ZEND_VM_COLD_CONST_HANDLER(51, ZEND_CAST, CONST|TMP|VAR|CV, ANY, TYPE) } else if (Z_OBJ_P(expr)->properties == NULL && Z_OBJ_HT_P(expr)->get_properties_for == NULL && Z_OBJ_HT_P(expr)->get_properties == zend_std_get_properties) { - /* Optimized version without rebulding properties HashTable */ + /* Optimized version without rebuilding properties HashTable */ ZVAL_ARR(result, zend_std_build_object_properties_array(Z_OBJ_P(expr))); } else { HashTable *obj_ht = zend_get_properties_for(expr, ZEND_PROP_PURPOSE_ARRAY_CAST); diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 24a4d67bf2da8..fddf37c154b4b 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -4764,7 +4764,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CAST_SPEC_CONST_H } else if (Z_OBJ_P(expr)->properties == NULL && Z_OBJ_HT_P(expr)->get_properties_for == NULL && Z_OBJ_HT_P(expr)->get_properties == zend_std_get_properties) { - /* Optimized version without rebulding properties HashTable */ + /* Optimized version without rebuilding properties HashTable */ ZVAL_ARR(result, zend_std_build_object_properties_array(Z_OBJ_P(expr))); } else { HashTable *obj_ht = zend_get_properties_for(expr, ZEND_PROP_PURPOSE_ARRAY_CAST); @@ -19015,7 +19015,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CAST_SPEC_TMP_HANDLER(ZEND_OPC } else if (Z_OBJ_P(expr)->properties == NULL && Z_OBJ_HT_P(expr)->get_properties_for == NULL && Z_OBJ_HT_P(expr)->get_properties == zend_std_get_properties) { - /* Optimized version without rebulding properties HashTable */ + /* Optimized version without rebuilding properties HashTable */ ZVAL_ARR(result, zend_std_build_object_properties_array(Z_OBJ_P(expr))); } else { HashTable *obj_ht = zend_get_properties_for(expr, ZEND_PROP_PURPOSE_ARRAY_CAST); @@ -21630,7 +21630,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CAST_SPEC_VAR_HANDLER(ZEND_OPC } else if (Z_OBJ_P(expr)->properties == NULL && Z_OBJ_HT_P(expr)->get_properties_for == NULL && Z_OBJ_HT_P(expr)->get_properties == zend_std_get_properties) { - /* Optimized version without rebulding properties HashTable */ + /* Optimized version without rebuilding properties HashTable */ ZVAL_ARR(result, zend_std_build_object_properties_array(Z_OBJ_P(expr))); } else { HashTable *obj_ht = zend_get_properties_for(expr, ZEND_PROP_PURPOSE_ARRAY_CAST); @@ -38237,7 +38237,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CAST_SPEC_CV_HANDLER(ZEND_OPCO } else if (Z_OBJ_P(expr)->properties == NULL && Z_OBJ_HT_P(expr)->get_properties_for == NULL && Z_OBJ_HT_P(expr)->get_properties == zend_std_get_properties) { - /* Optimized version without rebulding properties HashTable */ + /* Optimized version without rebuilding properties HashTable */ ZVAL_ARR(result, zend_std_build_object_properties_array(Z_OBJ_P(expr))); } else { HashTable *obj_ht = zend_get_properties_for(expr, ZEND_PROP_PURPOSE_ARRAY_CAST); diff --git a/appveyor/test_task.bat b/appveyor/test_task.bat index c38eb27901f09..e6d88ffefc04f 100644 --- a/appveyor/test_task.bat +++ b/appveyor/test_task.bat @@ -62,7 +62,7 @@ rem set OPENSSL_CONF=%OPENSSLDIR%\openssl.cnf set OPENSSL_CONF= rem set SSLEAY_CONF= -rem prepare for Opcache +rem prepare for OPcache if "%OPCACHE%" equ "1" set OPCACHE_OPTS=-d opcache.enable=1 -d opcache.enable_cli=1 -d opcache.protect_memory=1 -d opcache.jit_buffer_size=16M rem prepare for enchant diff --git a/docs/self-contained-extensions.md b/docs/self-contained-extensions.md index 47f4c636baca8..a583007b75f30 100644 --- a/docs/self-contained-extensions.md +++ b/docs/self-contained-extensions.md @@ -8,7 +8,7 @@ To create such an extension, two things are required: We will describe now how to create these and how to put things together. -## Prepairing your system +## Preparing your system While the result will run on any system, a developer's setup needs these tools: diff --git a/main/SAPI.c b/main/SAPI.c index 79d9610a53154..06fbc504d2ed9 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -575,8 +575,8 @@ static void sapi_update_response_code(int ncode) } /* - * since zend_llist_del_element only remove one matched item once, - * we should remove them by ourself + * since zend_llist_del_element only removes one matched item once, + * we should remove them manually */ static void sapi_remove_header(zend_llist *l, char *name, size_t len) { sapi_header_struct *header; diff --git a/main/alloca.c b/main/alloca.c index 480b9b0ab52f0..9c8d458189abe 100644 --- a/main/alloca.c +++ b/main/alloca.c @@ -119,7 +119,7 @@ find_stack_direction () #endif /* STACK_DIRECTION == 0 */ /* An "alloca header" is used to: - (a) chain together all alloca'ed blocks; + (a) chain together all alloca'd blocks; (b) keep track of stack depth. It is very important that sizeof(header) agree with malloc @@ -253,7 +253,7 @@ struct stack_segment_linkage long ssusr1; /* Reserved for user. */ long ssusr2; /* Reserved for user. */ long sstpid; /* Process ID for pid based multi-tasking. */ - long ssgvup; /* Pointer to multitasking thread giveup. */ + long ssgvup; /* Pointer to multitasking thread give up. */ long sscray[7]; /* Reserved for Cray Research. */ long ssa0; long ssa1; diff --git a/main/fastcgi.c b/main/fastcgi.c index dacb06bcfec89..f5db3bb9a699e 100644 --- a/main/fastcgi.c +++ b/main/fastcgi.c @@ -1032,7 +1032,7 @@ static int fcgi_get_params(fcgi_request *req, unsigned char *p, unsigned char *e val_len |= *p++; } if (UNEXPECTED(name_len + val_len > (unsigned int) (end - p))) { - /* Malformated request */ + /* Malformed request */ return 0; } fcgi_hash_set(&req->env, FCGI_HASH_FUNC(p, name_len), (char*)p, name_len, (char*)p + name_len, val_len); diff --git a/main/getopt.c b/main/getopt.c index 2160a6f4fec5c..fe5ea310838bd 100644 --- a/main/getopt.c +++ b/main/getopt.c @@ -25,21 +25,21 @@ #define OPTERRARG (3) // Print error message to stderr and return -2 to distinguish it from '?' command line option. -static int php_opt_error(int argc, char * const *argv, int oint, int optchr, int err, int show_err) /* {{{ */ +static int php_opt_error(int argc, char * const *argv, int optint, int optchr, int err, int show_err) /* {{{ */ { if (show_err) { - fprintf(stderr, "Error in argument %d, char %d: ", oint, optchr+1); + fprintf(stderr, "Error in argument %d, char %d: ", optint, optchr+1); switch(err) { case OPTERRCOLON: fprintf(stderr, ": in flags\n"); break; case OPTERRNF: - fprintf(stderr, "option not found %c\n", argv[oint][optchr]); + fprintf(stderr, "option not found %c\n", argv[optint][optchr]); break; case OPTERRARG: - fprintf(stderr, "no argument for option %c\n", argv[oint][optchr]); + fprintf(stderr, "no argument for option %c\n", argv[optint][optchr]); break; default: fprintf(stderr, "unknown\n"); diff --git a/main/main.c b/main/main.c index 881ae6e642d15..73f3cdf8c1f65 100644 --- a/main/main.c +++ b/main/main.c @@ -1950,7 +1950,7 @@ void dummy_invalid_parameter_handler( const wchar_t *function, const wchar_t *file, unsigned int line, - uintptr_t pEwserved) + uintptr_t pReserved) { static int called = 0; char buf[1024]; diff --git a/main/output.c b/main/output.c index ec844973c5473..94fb8f431403f 100644 --- a/main/output.c +++ b/main/output.c @@ -884,7 +884,7 @@ static inline php_output_handler *php_output_handler_init(zend_string *name, siz } /* }}} */ -/* {{{ static int php_output_handler_appen(php_output_handler *handler, const php_output_buffer *buf) +/* {{{ static int php_output_handler_append(php_output_handler *handler, const php_output_buffer *buf) * Appends input to the output handlers buffer and indicates whether the buffer does not have to be processed by the output handler */ static inline int php_output_handler_append(php_output_handler *handler, const php_output_buffer *buf) { diff --git a/main/php_variables.c b/main/php_variables.c index 4c284cacfb227..693645d1e6874 100644 --- a/main/php_variables.c +++ b/main/php_variables.c @@ -788,7 +788,7 @@ static bool php_auto_globals_create_files(zend_string *name) return 0; /* don't rearm */ } -/* Upgly hack to fix HTTP_PROXY issue, see bug #72573 */ +/* Ugly hack to fix HTTP_PROXY issue, see bug #72573 */ static void check_http_proxy(HashTable *var_table) { if (zend_hash_str_exists(var_table, "HTTP_PROXY", sizeof("HTTP_PROXY")-1)) { diff --git a/main/rfc1867.c b/main/rfc1867.c index f73aabdcba7fe..980706128565d 100644 --- a/main/rfc1867.c +++ b/main/rfc1867.c @@ -87,7 +87,7 @@ static void normalize_protected_variable(char *varname) /* {{{ */ { char *s = varname, *index = NULL, *indexend = NULL, *p; - /* overjump leading space */ + /* skip leading space */ while (*s == ' ') { s++; } @@ -678,7 +678,7 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */ int boundary_len = 0, cancel_upload = 0, is_arr_upload = 0; size_t array_len = 0; int64_t total_bytes = 0, max_file_size = 0; - int skip_upload = 0, anonindex = 0, is_anonymous; + int skip_upload = 0, anonymous_index = 0, is_anonymous; HashTable *uploaded_files = NULL; multipart_buffer *mbuff; zval *array_ptr = (zval *) arg; @@ -923,7 +923,7 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */ if (!param) { is_anonymous = 1; param = emalloc(MAX_SIZE_ANONNAME); - snprintf(param, MAX_SIZE_ANONNAME, "%u", anonindex++); + snprintf(param, MAX_SIZE_ANONNAME, "%u", anonymous_index++); } else { is_anonymous = 0; } diff --git a/main/snprintf.c b/main/snprintf.c index 581cac1d3bdf9..46504411455f1 100644 --- a/main/snprintf.c +++ b/main/snprintf.c @@ -496,7 +496,7 @@ PHPAPI char * ap_php_conv_p2(register u_wide_int num, register int nbits, char f * XXX: this is a magic number; do not decrease it * Emax = 1023 * NDIG = 320 - * NUM_BUF_SIZE >= strlen("-") + Emax + strlrn(".") + NDIG + strlen("E+1023") + 1; + * NUM_BUF_SIZE >= strlen("-") + Emax + strlen(".") + NDIG + strlen("E+1023") + 1; */ #define NUM_BUF_SIZE 2048 diff --git a/main/snprintf.h b/main/snprintf.h index 8a3656212789b..1e2c52082498e 100644 --- a/main/snprintf.h +++ b/main/snprintf.h @@ -23,7 +23,7 @@ sprintf offers the ability to make a lot of failures since it does not know the size of the buffer it uses. Therefore usage of sprintf often results in possible entries for buffer overrun attacks. So please use this version only if you are sure the call is safe. sprintf - always terminstes the buffer it writes to. + always terminates the buffer it writes to. snprintf knows the buffers size and will not write behind it. But you will have to use either a static buffer or allocate a dynamic buffer @@ -41,7 +41,7 @@ slprintf same as snprintf with the difference that it actually returns the spprintf is the dynamical version of snprintf. It allocates the buffer in size as needed and allows a maximum setting as snprintf (turn this feature off by setting max_len to 0). spprintf is a little bit slower than - snprintf and offers possible memory leakes if you miss freeing the + snprintf and offers possible memory leaks if you miss freeing the buffer allocated by the function. Therefore this function should be used where either no maximum is known or the maximum is much bigger than normal size required. spprintf always terminates the buffer. diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index 58b5b64e0e9c1..19b119295eafc 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -416,7 +416,7 @@ static ssize_t php_stdiop_read(php_stream *stream, char *buf, size_t count) if (ret == (size_t)-1 && errno == EINTR) { /* Read was interrupted, retry once, - If read still fails, giveup with feof==0 + If read still fails, give up with feof==0 so script can retry if desired */ ret = read(data->fd, buf, PLAIN_WRAP_BUF_SIZE(count)); } diff --git a/main/streams/streams.c b/main/streams/streams.c index 7df0dcce28d55..0b4d735d0e60d 100644 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -340,7 +340,7 @@ static const char *_php_stream_pretty_free_options(int close_options, char *out) if (close_options & PHP_STREAM_FREE_RELEASE_STREAM) strcat(out, "RELEASE_STREAM, "); if (close_options & PHP_STREAM_FREE_PRESERVE_HANDLE) - strcat(out, "PREVERSE_HANDLE, "); + strcat(out, "PRESERVE_HANDLE, "); if (close_options & PHP_STREAM_FREE_RSRC_DTOR) strcat(out, "RSRC_DTOR, "); if (close_options & PHP_STREAM_FREE_PERSISTENT) @@ -368,7 +368,7 @@ PHPAPI int _php_stream_free(php_stream *stream, int close_options) /* {{{ */ php_stream_context *context; /* During shutdown resources may be released before other resources still holding them. - * When only resoruces are referenced this is not a problem, because they are refcounted + * When only resources are referenced this is not a problem, because they are refcounted * and will only be fully freed once the refcount drops to zero. However, if php_stream* * is held directly, we don't have this guarantee. To avoid use-after-free we ignore all * stream free operations in shutdown unless they come from the resource list destruction, @@ -1105,7 +1105,7 @@ PHPAPI zend_string *php_stream_get_record(php_stream *stream, size_t maxlen, con ret_buf = zend_string_alloc(tent_ret_len, 0); /* php_stream_read will not call ops->read here because the necessary - * data is guaranteedly buffered */ + * data is guaranteed to be buffered */ ZSTR_LEN(ret_buf) = php_stream_read(stream, ZSTR_VAL(ret_buf), tent_ret_len); if (found_delim) { diff --git a/php.ini-development b/php.ini-development index a8f538785be7d..0296767a774a6 100644 --- a/php.ini-development +++ b/php.ini-development @@ -1605,7 +1605,7 @@ zend.assertions = 1 ; https://php.net/com.allow-dcom ;com.allow_dcom = true -; autoregister constants of a component's typlib on com_load() +; autoregister constants of a component's typelib on com_load() ; https://php.net/com.autoregister-typelib ;com.autoregister_typelib = true diff --git a/php.ini-production b/php.ini-production index 2d6b45d25a1df..b14ed0c3bae33 100644 --- a/php.ini-production +++ b/php.ini-production @@ -1607,7 +1607,7 @@ zend.assertions = -1 ; https://php.net/com.allow-dcom ;com.allow_dcom = true -; autoregister constants of a component's typlib on com_load() +; autoregister constants of a component's typelib on com_load() ; https://php.net/com.autoregister-typelib ;com.autoregister_typelib = true diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c index 049f1b7d3589b..15529ff7d8fd7 100644 --- a/sapi/apache2handler/sapi_apache2.c +++ b/sapi/apache2handler/sapi_apache2.c @@ -189,7 +189,7 @@ php_apache_sapi_read_post(char *buf, size_t count_bytes) /* * This loop is needed because ap_get_brigade() can return us partial data - * which would cause premature termination of request read. Therefor we + * which would cause premature termination of request read. Therefore we * need to make sure that if data is available we fill the buffer completely. */ @@ -675,7 +675,7 @@ zend_first_try { /* * check if coming due to ErrorDocument * We make a special exception of 413 (Invalid POST request) as the invalidity of the request occurs - * during processing of the request by PHP during POST processing. Therefor we need to re-use the exiting + * during processing of the request by PHP during POST processing. Therefore we need to re-use the exiting * PHP instance to handle the request rather then creating a new one. */ if (parent_req && parent_req->status != HTTP_OK && parent_req->status != 413 && strcmp(r->protocol, "INCLUDED")) { diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index 8673ec47dfe26..a7e8cf04376a6 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -2011,7 +2011,7 @@ consult the installation file that came with this distribution, or visit \n\ int running = 0; pid_t pid; - /* Create a process group for ourself & children */ + /* Create a process group for us & children */ setsid(); pgroup = getpgrp(); #ifdef DEBUG_FASTCGI diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index 835582df88cf4..8f17a46465869 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -947,7 +947,7 @@ static int do_cli(int argc, char **argv) /* {{{ */ is_ps_title_available() == PS_TITLE_SUCCESS, CONST_CS, 0); - *arg_excp = arg_free; /* reconstuct argv */ + *arg_excp = arg_free; /* reconstruct argv */ if (hide_argv) { int i; @@ -1338,7 +1338,7 @@ int main(int argc, char *argv[]) /* startup after we get the above ini override se we get things right */ if (sapi_module->startup(sapi_module) == FAILURE) { /* there is no way to see if we must call zend_ini_deactivate() - * since we cannot check if EG(ini_directives) has been initialised + * since we cannot check if EG(ini_directives) has been initialized * because the executor's constructor does not set initialize it. * Apart from that there seems no need for zend_ini_deactivate() yet. * So we goto out_err.*/ diff --git a/sapi/cli/php_http_parser.h b/sapi/cli/php_http_parser.h index 8e97013d07d68..131a70ea0bdae 100644 --- a/sapi/cli/php_http_parser.h +++ b/sapi/cli/php_http_parser.h @@ -63,7 +63,7 @@ typedef struct php_http_parser_settings php_http_parser_settings; * HEAD request which may contain 'Content-Length' or 'Transfer-Encoding: * chunked' headers that indicate the presence of a body. * - * http_data_cb does not return data chunks. It will be call arbitrarally + * http_data_cb does not return data chunks. It will be call arbitrarily * many times for each string. E.G. you might get 10 callbacks for "on_path" * each providing just a few characters more data. */ diff --git a/sapi/fpm/fpm/events/devpoll.c b/sapi/fpm/fpm/events/devpoll.c index 0d165fe2fc8b4..9addd20f64284 100644 --- a/sapi/fpm/fpm/events/devpoll.c +++ b/sapi/fpm/fpm/events/devpoll.c @@ -152,7 +152,7 @@ static int fpm_event_devpoll_wait(struct fpm_event_queue_s *queue, unsigned long dopoll.dp_nfds = npollfds; dopoll.dp_timeout = (int)timeout; - /* wait for inconming event or timeout */ + /* wait for incoming event or timeout */ ret = ioctl(dpfd, DP_POLL, &dopoll); if (ret < 0) { diff --git a/sapi/fpm/fpm/events/epoll.c b/sapi/fpm/fpm/events/epoll.c index 9973ac0ddcef1..9eade128df915 100644 --- a/sapi/fpm/fpm/events/epoll.c +++ b/sapi/fpm/fpm/events/epoll.c @@ -120,7 +120,7 @@ static int fpm_event_epoll_wait(struct fpm_event_queue_s *queue, unsigned long i /* ensure we have a clean epoolfds before calling epoll_wait() */ memset(epollfds, 0, sizeof(struct epoll_event) * nepollfds); - /* wait for inconming event or timeout */ + /* wait for incoming event or timeout */ ret = epoll_wait(epollfd, epollfds, nepollfds, timeout); if (ret == -1) { diff --git a/sapi/fpm/fpm/events/poll.c b/sapi/fpm/fpm/events/poll.c index 0363c2ece10a4..49559c42d7cf8 100644 --- a/sapi/fpm/fpm/events/poll.c +++ b/sapi/fpm/fpm/events/poll.c @@ -136,7 +136,7 @@ static int fpm_event_poll_wait(struct fpm_event_queue_s *queue, unsigned long in memcpy(active_pollfds, pollfds, sizeof(struct pollfd) * npollfds); } - /* wait for inconming event or timeout */ + /* wait for incoming event or timeout */ ret = poll(active_pollfds, npollfds, timeout); if (ret == -1) { diff --git a/sapi/fpm/fpm/events/port.c b/sapi/fpm/fpm/events/port.c index d9aee3bfcd462..db574cddaf4a8 100644 --- a/sapi/fpm/fpm/events/port.c +++ b/sapi/fpm/fpm/events/port.c @@ -119,7 +119,7 @@ static int fpm_event_port_wait(struct fpm_event_queue_s *queue, unsigned long in t.tv_sec = (int)(timeout / 1000); t.tv_nsec = (timeout % 1000) * 1000 * 1000; - /* wait for inconming event or timeout. We want at least one event or timeout */ + /* wait for incoming event or timeout. We want at least one event or timeout */ nget = 1; ret = port_getn(pfd, events, nevents, &nget, &t); if (ret < 0) { diff --git a/sapi/fpm/fpm/events/select.c b/sapi/fpm/fpm/events/select.c index 61b33c55695da..e1558acffe781 100644 --- a/sapi/fpm/fpm/events/select.c +++ b/sapi/fpm/fpm/events/select.c @@ -93,7 +93,7 @@ static int fpm_event_select_wait(struct fpm_event_queue_s *queue, unsigned long t.tv_sec = timeout / 1000; t.tv_usec = (timeout % 1000) * 1000; - /* wait for inconming event or timeout */ + /* wait for incoming event or timeout */ ret = select(FD_SETSIZE, ¤t_fds, NULL, NULL, &t); if (ret == -1) { diff --git a/sapi/fpm/fpm/fpm_children.c b/sapi/fpm/fpm/fpm_children.c index fe92bdf1b0c03..c5578838846c1 100644 --- a/sapi/fpm/fpm/fpm_children.c +++ b/sapi/fpm/fpm/fpm_children.c @@ -393,7 +393,7 @@ int fpm_children_make(struct fpm_worker_pool_s *wp, int in_event_loop, int nb_to * - fpm_pctl_can_spawn_children : FPM is running in a NORMAL state (aka not restart, stop or reload) * - wp->running_children < max : there is less than the max process for the current pool * - (fpm_global_config.process_max < 1 || fpm_globals.running_children < fpm_global_config.process_max): - * if fpm_global_config.process_max is set, FPM has not fork this number of processes (globaly) + * if fpm_global_config.process_max is set, FPM has not fork this number of processes (globally) */ while (fpm_pctl_can_spawn_children() && wp->running_children < max && (fpm_global_config.process_max < 1 || fpm_globals.running_children < fpm_global_config.process_max)) { diff --git a/sapi/fpm/fpm/fpm_clock.c b/sapi/fpm/fpm/fpm_clock.c index cd0bb7320c5cb..72de43e327506 100644 --- a/sapi/fpm/fpm/fpm_clock.c +++ b/sapi/fpm/fpm/fpm_clock.c @@ -48,7 +48,7 @@ int fpm_clock_get(struct timeval *tv) /* {{{ */ } /* }}} */ -/* macosx clock */ +/* macOS clock */ #elif defined(HAVE_CLOCK_GET_TIME) #include diff --git a/sapi/fpm/fpm/fpm_conf.c b/sapi/fpm/fpm/fpm_conf.c index 72772031e42d0..65c802f9438ac 100644 --- a/sapi/fpm/fpm/fpm_conf.c +++ b/sapi/fpm/fpm/fpm_conf.c @@ -892,7 +892,7 @@ static int fpm_conf_process_all_pools() /* {{{ */ struct fpm_worker_pool_config_s *config = wp->config; if (!fpm_event_support_edge_trigger()) { - zlog(ZLOG_ALERT, "[pool %s] ondemand process manager can ONLY be used when events.mechanisme is either epoll (Linux) or kqueue (*BSD).", wp->config->name); + zlog(ZLOG_ALERT, "[pool %s] ondemand process manager can ONLY be used when events.mechanism is either epoll (Linux) or kqueue (*BSD).", wp->config->name); return -1; } @@ -906,7 +906,7 @@ static int fpm_conf_process_all_pools() /* {{{ */ config->listen_backlog = FPM_BACKLOG_DEFAULT; } - /* certainely useless but proper */ + /* certainly useless but proper */ config->pm_start_servers = 0; config->pm_min_spare_servers = 0; config->pm_max_spare_servers = 0; @@ -1687,7 +1687,7 @@ static void fpm_conf_dump() /* {{{ */ zlog(ZLOG_NOTICE, "\tdaemonize = %s", BOOL2STR(fpm_global_config.daemonize)); zlog(ZLOG_NOTICE, "\trlimit_files = %d", fpm_global_config.rlimit_files); zlog(ZLOG_NOTICE, "\trlimit_core = %d", fpm_global_config.rlimit_core); - zlog(ZLOG_NOTICE, "\tevents.mechanism = %s", fpm_event_machanism_name()); + zlog(ZLOG_NOTICE, "\tevents.mechanism = %s", fpm_event_mechanism_name()); #ifdef HAVE_SYSTEMD zlog(ZLOG_NOTICE, "\tsystemd_interval = %ds", fpm_global_config.systemd_interval/1000); #endif diff --git a/sapi/fpm/fpm/fpm_env.c b/sapi/fpm/fpm/fpm_env.c index a9227f8c7dbca..7e70e52fd2637 100644 --- a/sapi/fpm/fpm/fpm_env.c +++ b/sapi/fpm/fpm/fpm_env.c @@ -211,7 +211,7 @@ int fpm_env_init_main() /* {{{ */ char *first = NULL; char *last = NULL; /* - * This piece of code has been inspirated from nginx and pureftpd code, which + * This piece of code has been inspired from nginx and pureftpd code, which * are under BSD licence. * * To change the process title in Linux we have to set argv[1] to NULL diff --git a/sapi/fpm/fpm/fpm_events.c b/sapi/fpm/fpm/fpm_events.c index 35b0ef8bb0eca..dfbd5bd58c495 100644 --- a/sapi/fpm/fpm/fpm_events.c +++ b/sapi/fpm/fpm/fpm_events.c @@ -245,12 +245,12 @@ static void fpm_event_queue_destroy(struct fpm_event_queue_s **queue) /* {{{ */ } /* }}} */ -int fpm_event_pre_init(char *machanism) /* {{{ */ +int fpm_event_pre_init(char *mechanism) /* {{{ */ { /* kqueue */ module = fpm_event_kqueue_module(); if (module) { - if (!machanism || strcasecmp(module->name, machanism) == 0) { + if (!mechanism || strcasecmp(module->name, mechanism) == 0) { return 0; } } @@ -258,7 +258,7 @@ int fpm_event_pre_init(char *machanism) /* {{{ */ /* port */ module = fpm_event_port_module(); if (module) { - if (!machanism || strcasecmp(module->name, machanism) == 0) { + if (!mechanism || strcasecmp(module->name, mechanism) == 0) { return 0; } } @@ -266,7 +266,7 @@ int fpm_event_pre_init(char *machanism) /* {{{ */ /* epoll */ module = fpm_event_epoll_module(); if (module) { - if (!machanism || strcasecmp(module->name, machanism) == 0) { + if (!mechanism || strcasecmp(module->name, mechanism) == 0) { return 0; } } @@ -274,7 +274,7 @@ int fpm_event_pre_init(char *machanism) /* {{{ */ /* /dev/poll */ module = fpm_event_devpoll_module(); if (module) { - if (!machanism || strcasecmp(module->name, machanism) == 0) { + if (!mechanism || strcasecmp(module->name, mechanism) == 0) { return 0; } } @@ -282,7 +282,7 @@ int fpm_event_pre_init(char *machanism) /* {{{ */ /* poll */ module = fpm_event_poll_module(); if (module) { - if (!machanism || strcasecmp(module->name, machanism) == 0) { + if (!mechanism || strcasecmp(module->name, mechanism) == 0) { return 0; } } @@ -290,13 +290,13 @@ int fpm_event_pre_init(char *machanism) /* {{{ */ /* select */ module = fpm_event_select_module(); if (module) { - if (!machanism || strcasecmp(module->name, machanism) == 0) { + if (!mechanism || strcasecmp(module->name, mechanism) == 0) { return 0; } } - if (machanism) { - zlog(ZLOG_ERROR, "event mechanism '%s' is not available on this system", machanism); + if (mechanism) { + zlog(ZLOG_ERROR, "event mechanism '%s' is not available on this system", mechanism); } else { zlog(ZLOG_ERROR, "unable to find a suitable event mechanism on this system"); } @@ -304,7 +304,7 @@ int fpm_event_pre_init(char *machanism) /* {{{ */ } /* }}} */ -const char *fpm_event_machanism_name() /* {{{ */ +const char *fpm_event_mechanism_name() /* {{{ */ { return module ? module->name : NULL; } diff --git a/sapi/fpm/fpm/fpm_events.h b/sapi/fpm/fpm/fpm_events.h index e97ede082491f..d9be56efdf2cf 100644 --- a/sapi/fpm/fpm/fpm_events.h +++ b/sapi/fpm/fpm/fpm_events.h @@ -43,8 +43,8 @@ int fpm_event_init_main(); int fpm_event_set(struct fpm_event_s *ev, int fd, int flags, void (*callback)(struct fpm_event_s *, short, void *), void *arg); int fpm_event_add(struct fpm_event_s *ev, unsigned long int timeout); int fpm_event_del(struct fpm_event_s *ev); -int fpm_event_pre_init(char *machanism); -const char *fpm_event_machanism_name(); +int fpm_event_pre_init(char *mechanism); +const char *fpm_event_mechanism_name(); int fpm_event_support_edge_trigger(); #endif diff --git a/sapi/fpm/fpm/fpm_log.c b/sapi/fpm/fpm/fpm_log.c index 6f1e517a9fdea..7d0850df5f88f 100644 --- a/sapi/fpm/fpm/fpm_log.c +++ b/sapi/fpm/fpm/fpm_log.c @@ -205,8 +205,11 @@ int fpm_log_write(char *log_format) /* {{{ */ len2 = snprintf(b, FPM_LOG_BUFFER - len, "%.3f", proc.duration.tv_sec + proc.duration.tv_usec / 1000000.); } - /* miliseconds */ - } else if (!strcasecmp(format, "miliseconds") || !strcasecmp(format, "mili")) { + /* milliseconds */ + } else if (!strcasecmp(format, "milliseconds") || !strcasecmp(format, "milli") || + /* mili/miliseconds are supported for backwards compatibility */ + !strcasecmp(format, "miliseconds") || !strcasecmp(format, "mili") + ) { if (!test) { len2 = snprintf(b, FPM_LOG_BUFFER - len, "%.3f", proc.duration.tv_sec * 1000. + proc.duration.tv_usec / 1000.); } @@ -218,7 +221,7 @@ int fpm_log_write(char *log_format) /* {{{ */ } } else { - zlog(ZLOG_WARNING, "only 'seconds', 'mili', 'miliseconds', 'micro' or 'microseconds' are allowed as a modifier for %%%c ('%s')", *s, format); + zlog(ZLOG_WARNING, "only 'seconds', 'milli', 'milliseconds', 'micro' or 'microseconds' are allowed as a modifier for %%%c ('%s')", *s, format); return -1; } format[0] = '\0'; diff --git a/sapi/fpm/fpm/fpm_shm.c b/sapi/fpm/fpm/fpm_shm.c index 52ae60ed28bdb..035f2443e30f0 100644 --- a/sapi/fpm/fpm/fpm_shm.c +++ b/sapi/fpm/fpm/fpm_shm.c @@ -8,7 +8,7 @@ #include "zlog.h" -/* MAP_ANON is deprecated, but not in macosx */ +/* MAP_ANON is deprecated, but not in macOS */ #if defined(MAP_ANON) && !defined(MAP_ANONYMOUS) #define MAP_ANONYMOUS MAP_ANON #endif diff --git a/sapi/fpm/fpm/fpm_sockets.c b/sapi/fpm/fpm/fpm_sockets.c index c9c0acc7b738b..6825464feeb17 100644 --- a/sapi/fpm/fpm/fpm_sockets.c +++ b/sapi/fpm/fpm/fpm_sockets.c @@ -230,7 +230,7 @@ static int fpm_sockets_new_listening_socket(struct fpm_worker_pool_s *wp, struct umask(saved_umask); - if (0 > fpm_unix_set_socket_premissions(wp, path)) { + if (0 > fpm_unix_set_socket_permissions(wp, path)) { close(sock); return -1; } @@ -438,7 +438,7 @@ int fpm_sockets_init_main() /* {{{ */ break; case FPM_AF_UNIX : - if (0 > fpm_unix_resolve_socket_premissions(wp)) { + if (0 > fpm_unix_resolve_socket_permissions(wp)) { return -1; } wp->listening_socket = fpm_socket_af_unix_listening_socket(wp); diff --git a/sapi/fpm/fpm/fpm_unix.c b/sapi/fpm/fpm/fpm_unix.c index 1c28b1aa09bef..8fe27ca366235 100644 --- a/sapi/fpm/fpm/fpm_unix.c +++ b/sapi/fpm/fpm/fpm_unix.c @@ -34,7 +34,7 @@ size_t fpm_pagesize; -int fpm_unix_resolve_socket_premissions(struct fpm_worker_pool_s *wp) /* {{{ */ +int fpm_unix_resolve_socket_permissions(struct fpm_worker_pool_s *wp) /* {{{ */ { struct fpm_worker_pool_config_s *c = wp->config; #ifdef HAVE_FPM_ACL @@ -198,7 +198,7 @@ int fpm_unix_resolve_socket_premissions(struct fpm_worker_pool_s *wp) /* {{{ */ } /* }}} */ -int fpm_unix_set_socket_premissions(struct fpm_worker_pool_s *wp, const char *path) /* {{{ */ +int fpm_unix_set_socket_permissions(struct fpm_worker_pool_s *wp, const char *path) /* {{{ */ { #ifdef HAVE_FPM_ACL if (wp->socket_acl) { @@ -249,7 +249,7 @@ int fpm_unix_set_socket_premissions(struct fpm_worker_pool_s *wp, const char *pa } /* }}} */ -int fpm_unix_free_socket_premissions(struct fpm_worker_pool_s *wp) /* {{{ */ +int fpm_unix_free_socket_permissions(struct fpm_worker_pool_s *wp) /* {{{ */ { #ifdef HAVE_FPM_ACL if (wp->socket_acl) { @@ -482,7 +482,7 @@ int fpm_unix_init_main() /* {{{ */ * * The parent process has then to wait for the master * process to initialize to return a consistent exit - * value. For this pupose, the master process will + * value. For this purpose, the master process will * send \"1\" into the pipe if everything went well * and \"0\" otherwise. */ diff --git a/sapi/fpm/fpm/fpm_unix.h b/sapi/fpm/fpm/fpm_unix.h index c65791f7ed492..8521a7610ec3b 100644 --- a/sapi/fpm/fpm/fpm_unix.h +++ b/sapi/fpm/fpm/fpm_unix.h @@ -5,9 +5,9 @@ #include "fpm_worker_pool.h" -int fpm_unix_resolve_socket_premissions(struct fpm_worker_pool_s *wp); -int fpm_unix_set_socket_premissions(struct fpm_worker_pool_s *wp, const char *path); -int fpm_unix_free_socket_premissions(struct fpm_worker_pool_s *wp); +int fpm_unix_resolve_socket_permissions(struct fpm_worker_pool_s *wp); +int fpm_unix_set_socket_permissions(struct fpm_worker_pool_s *wp, const char *path); +int fpm_unix_free_socket_permissions(struct fpm_worker_pool_s *wp); int fpm_unix_init_child(struct fpm_worker_pool_s *wp); int fpm_unix_init_main(); diff --git a/sapi/fpm/fpm/fpm_worker_pool.c b/sapi/fpm/fpm/fpm_worker_pool.c index d04528f4e0d0e..7eb7f7b390d13 100644 --- a/sapi/fpm/fpm/fpm_worker_pool.c +++ b/sapi/fpm/fpm/fpm_worker_pool.c @@ -40,7 +40,7 @@ void fpm_worker_pool_free(struct fpm_worker_pool_s *wp) /* {{{ */ if (wp->limit_extensions) { fpm_worker_pool_free_limit_extensions(wp->limit_extensions); } - fpm_unix_free_socket_premissions(wp); + fpm_unix_free_socket_permissions(wp); free(wp); } /* }}} */ diff --git a/sapi/fpm/php-fpm.conf.in b/sapi/fpm/php-fpm.conf.in index 7f21aaa9606a1..4818f20b436e9 100644 --- a/sapi/fpm/php-fpm.conf.in +++ b/sapi/fpm/php-fpm.conf.in @@ -53,7 +53,7 @@ ; Log buffering specifies if the log line is buffered which means that the ; line is written in a single write operation. If the value is false, then the ; data is written directly into the file descriptor. It is an experimental -; option that can potentionaly improve logging performance and memory usage +; option that can potentially improve logging performance and memory usage ; for some heavy logging scenarios. This option is ignored if logging to syslog ; as it has to be always buffered. ; Default value: yes diff --git a/sapi/fpm/www.conf.in b/sapi/fpm/www.conf.in index ebf1bb8c9094c..d13b60067fb38 100644 --- a/sapi/fpm/www.conf.in +++ b/sapi/fpm/www.conf.in @@ -295,7 +295,7 @@ pm.max_spare_servers = 3 ; it can accept the following format: ; - %{seconds}d (default) ; - %{milliseconds}d -; - %{mili}d +; - %{milli}d ; - %{microseconds}d ; - %{micro}d ; %e: an environment variable (same as $_ENV or $_SERVER) @@ -330,17 +330,17 @@ pm.max_spare_servers = 3 ; %t: server time the request was received ; it can accept a strftime(3) format: ; %d/%b/%Y:%H:%M:%S %z (default) -; The strftime(3) format must be encapsuled in a %{}t tag +; The strftime(3) format must be encapsulated in a %{}t tag ; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t ; %T: time the log has been written (the request has finished) ; it can accept a strftime(3) format: ; %d/%b/%Y:%H:%M:%S %z (default) -; The strftime(3) format must be encapsuled in a %{}t tag +; The strftime(3) format must be encapsulated in a %{}t tag ; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t ; %u: remote user ; ; Default: "%R - %u %t \"%m %r\" %s" -;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%" +;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{milli}d %{kilo}M %C%%" ; The log file for slow requests ; Default Value: not set diff --git a/sapi/fuzzer/corpus/json/pass1.json b/sapi/fuzzer/corpus/json/pass1.json index 70e2685436928..623a7203b2ed5 100644 --- a/sapi/fuzzer/corpus/json/pass1.json +++ b/sapi/fuzzer/corpus/json/pass1.json @@ -20,8 +20,8 @@ "backslash": "\\", "controls": "\b\f\n\r\t", "slash": "/ & \/", - "alpha": "abcdefghijklmnopqrstuvwyz", - "ALPHA": "ABCDEFGHIJKLMNOPQRSTUVWYZ", + "alpha": "abcdefghijklmnopqrstuvwxyz", + "ALPHA": "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "digit": "0123456789", "0123456789": "digit", "special": "`1~!@#$%^&*()_+-={':[,]}|;.?", diff --git a/sapi/litespeed/README.md b/sapi/litespeed/README.md index 19283f182e86e..86037732953a3 100644 --- a/sapi/litespeed/README.md +++ b/sapi/litespeed/README.md @@ -88,7 +88,7 @@ versa. Brief instructions are as follow: -1. Login to web administration interface, go to 'Server'->'Ext App' tab, add an +1. Log into web administration interface, go to 'Server'->'Ext App' tab, add an external application of type "LSAPI app", "Command" should be set to a shell command that executes the PHP binary you just built. "Instances" should be set to "1". Add "LSAPI_CHILDREN" environment variable to match the value of @@ -132,7 +132,7 @@ behavior of LSAPI application. "Self Managed Mode". When set to 0, the internal process manager will stop and start children process on demand to save system resource. This is preferred in a shared hosting environment. When set to 1, the internal process manager will - try to avoid freqently stopping and starting children process. This might be + try to avoid frequently stopping and starting children process. This might be preferred in a dedicate hosting environment. * `LSAPI_EXTRA_CHILDREN` (default: 1/3 of `LSAPI_CHILDREN` or 0) @@ -162,7 +162,7 @@ behavior of LSAPI application. In Self Managed Mode, `LSAI_MAX_IDLE_CHILDREN` controls how many idle children processes are allowed. Excessive idle children processes will be killed by the parent process immediately. When `LSAPI_AVOID_FORK` is set to 0, the default - value is 1/3 of `LSAPI_CHIDLREN`, When `LSAPI_AVOID_FORK` is set to 1, the + value is 1/3 of `LSAPI_CHILDREN`, When `LSAPI_AVOID_FORK` is set to 1, the default value is `LSAPI_CHILDREN`. * `LSAPI_MAX_PROCESS_TIME` (default value: 300 seconds) diff --git a/sapi/litespeed/lsapi_main.c b/sapi/litespeed/lsapi_main.c index 2ab2336aabeb5..9a8c7b1bc90f5 100644 --- a/sapi/litespeed/lsapi_main.c +++ b/sapi/litespeed/lsapi_main.c @@ -1567,7 +1567,7 @@ int main( int argc, char * argv[] ) while( ( result = LSAPI_Prefork_Accept_r( &g_req )) >= 0 ) { #if defined(linux) || defined(__linux) || defined(__linux__) || defined(__gnu_linux__) if (is_criu && !result) { - LSCRIU_inc_req_procssed(); + LSCRIU_inc_req_processed(); } #endif if ( slow_script_msec ) { diff --git a/sapi/litespeed/lsapilib.c b/sapi/litespeed/lsapilib.c index 444872de7f697..0eec9aeb72dab 100644 --- a/sapi/litespeed/lsapilib.c +++ b/sapi/litespeed/lsapilib.c @@ -944,7 +944,7 @@ static int lsapi_enterLVE( LSAPI_Request * pReq, uid_t uid ) ret = (*fp_lve_enter)(s_lve, uid, -1, -1, &cookie); if ( ret < 0 ) { - //lsapi_log("enter LVE (%d) : ressult: %d !\n", uid, ret ); + //lsapi_log("enter LVE (%d) : result: %d !\n", uid, ret ); LSAPI_perror_r(pReq, "LSAPI: lve_enter() failure, reached resource limit.", NULL ); lsapi_lve_error( pReq ); return -1; @@ -4181,7 +4181,7 @@ void lsapi_MD5Update(struct lsapi_MD5Context *ctx, unsigned char const *buf, uns /* - * Final wrapup - pad to 64-byte boundary with the bit pattern + * Final wrap-up - pad to 64-byte boundary with the bit pattern * 1 0* (64-bit count of bits processed, MSB-first) */ void lsapi_MD5Final(unsigned char digest[16], struct lsapi_MD5Context *ctx) diff --git a/sapi/litespeed/lscriu.c b/sapi/litespeed/lscriu.c index ba6e5b44cdc3d..9fad74d245337 100644 --- a/sapi/litespeed/lscriu.c +++ b/sapi/litespeed/lscriu.c @@ -289,9 +289,9 @@ static void LSCRIU_Wink_Server_is_Ready(void) // Not used for native return; } - if (getenv("LSAPI_UNIQE")) + if (getenv("LSAPI_UNIQUE")) snprintf(sem_name, sizeof sem_name - 1, "lsphp[hash=%s].is_ready", - getenv("LSAPI_UNIQE")); + getenv("LSAPI_UNIQUE")); else snprintf(sem_name, sizeof sem_name - 1, "lsphp[euid=0x%x].is_ready", geteuid()); @@ -469,7 +469,7 @@ static void LSCRIU_CloudLinux_Checkpoint(void) } -static void LSCRIU_Wait_Dump_Finsh_Or_Restored(int pid_parent) +static void LSCRIU_Wait_Dump_Finish_Or_Restored(int pid_parent) { // Now get restored. We know if we're restored if the ppid changes! // If we're dumped, we're killed (no use worrying about that!). @@ -528,7 +528,7 @@ static void LSCRIU_try_checkpoint(int *forked_pid) s_fd_native); close(s_fd_native); - LSCRIU_Wait_Dump_Finsh_Or_Restored(iPidParent); + LSCRIU_Wait_Dump_Finish_Or_Restored(iPidParent); LSCRIU_Restored_Error(0, "Restored!"); LSAPI_reset_server_state(); s_restored = 1; @@ -659,7 +659,7 @@ static int LSCRIU_Init_Env_Parameters(void) } -void LSCRIU_inc_req_procssed() +void LSCRIU_inc_req_processed() { if (!LSCRIU_Get_Global_Counter_Type()) { ++s_requests_count; diff --git a/sapi/litespeed/lscriu.h b/sapi/litespeed/lscriu.h index 0b631aeaa799d..0bdb88da4c041 100644 --- a/sapi/litespeed/lscriu.h +++ b/sapi/litespeed/lscriu.h @@ -55,7 +55,7 @@ extern "C" { // return 1 if CRIU is available, return 0 if CRIU is not available int LSCRIU_Init(void); -void LSCRIU_inc_req_procssed(void); +void LSCRIU_inc_req_processed(void); #if defined (c_plusplus) || defined (__cplusplus) diff --git a/sapi/phpdbg/phpdbg_btree.h b/sapi/phpdbg/phpdbg_btree.h index 54bc42a079ec8..b7e912ea82d48 100644 --- a/sapi/phpdbg/phpdbg_btree.h +++ b/sapi/phpdbg/phpdbg_btree.h @@ -60,7 +60,7 @@ int phpdbg_btree_delete(phpdbg_btree *tree, zend_ulong idx); int phpdbg_btree_insert_or_update(phpdbg_btree *tree, zend_ulong idx, void *ptr, int flags); #define phpdbg_btree_insert(tree, idx, ptr) phpdbg_btree_insert_or_update(tree, idx, ptr, PHPDBG_BTREE_INSERT) #define phpdbg_btree_update(tree, idx, ptr) phpdbg_btree_insert_or_update(tree, idx, ptr, PHPDBG_BTREE_UPDATE) -#define phpdbg_btree_overwrite(tree, idx, ptr) phpdbg_btree_insert_or_update(tree, idx, ptr, PHPDBG_BTREE_OWERWRITE) +#define phpdbg_btree_overwrite(tree, idx, ptr) phpdbg_btree_insert_or_update(tree, idx, ptr, PHPDBG_BTREE_OVERWRITE) /* debugging functions */ diff --git a/sapi/phpdbg/phpdbg_help.c b/sapi/phpdbg/phpdbg_help.c index 695774d9062e2..1f65f738379e3 100644 --- a/sapi/phpdbg/phpdbg_help.c +++ b/sapi/phpdbg/phpdbg_help.c @@ -87,7 +87,7 @@ void pretty_print(char *text) * $P substitutes the prompt sequence * Lines are wrapped by replacing the last blank with a CR before * characters. (This defaults to 100 if the width can't be detected). In the - * pathelogical case where no blanks are found, then the wrap occurs at the + * pathological case where no blanks are found, then the wrap occurs at the * first blank. */ for (p = text, q = new; *p; p++) { @@ -154,7 +154,7 @@ static char *get_help(const char * const key) phpdbg_help_text_t *p; /* Note that phpdbg_help_text is not assumed to be collated in key order. This is an - inconvience that means that help can't be logically grouped Not worth + inconvenience that means that help can't be logically grouped Not worth the savings */ for (p = phpdbg_help_text; p->key; p++) { @@ -383,10 +383,10 @@ phpdbg_help_text_t phpdbg_help_text[] = { "(and list out options if not unique), so **help exp** will give help on the **export** command, " "but **help ex** will list the summary for **exec** and **export**." CR CR -"Type **help aliases** to show a full alias list, including any registered phpdginit functions" CR +"Type **help aliases** to show a full alias list, including any registered phpdbginit functions" CR "Type **help syntax** for a general introduction to the command syntax." CR "Type **help options** for a list of phpdbg command line options." CR -"Type **help phpdbginit** to show how to customise the debugger environment." +"Type **help phpdbginit** to show how to customize the debugger environment." }, {"options", CR "Below are the command line options supported by phpdbg" CR CR @@ -444,7 +444,7 @@ phpdbg_help_text_t phpdbg_help_text[] = { }, {"phpdbginit", CR -"Phpdgb uses an debugger script file to initialize the debugger context. By default, phpdbg looks " +"Phpdbg uses an debugger script file to initialize the debugger context. By default, phpdbg looks " "for the file named **.phpdbginit** in the current working directory. This location can be " "overridden on the command line using the **-i** switch (see **help options** for a more " "details)." CR CR @@ -514,7 +514,7 @@ phpdbg_help_text_t phpdbg_help_text[] = { /******************************** Help Codicils ********************************/ {"aliases!", CR "Note that aliases can be used for either command or sub-command keywords or both, so **info b** " -"is a synomyn for **info break** and **l func** for **list func**, etc." CR CR +"is a synonym for **info break** and **l func** for **list func**, etc." CR CR "Note that help will also accept any alias as a parameter and provide help on that command, for example **h p** will provide help on the print command." }, @@ -760,7 +760,7 @@ phpdbg_help_text_t phpdbg_help_text[] = { }, {"list", -"The list command displays source code for the given argument. The target type is specficied by " +"The list command displays source code for the given argument. The target type is specified by " "a second subcommand keyword:" CR CR " **Type** **Alias** **Purpose**" CR diff --git a/sapi/phpdbg/phpdbg_out.c b/sapi/phpdbg/phpdbg_out.c index 581ec0ca4ee71..a10bd9a03e02c 100644 --- a/sapi/phpdbg/phpdbg_out.c +++ b/sapi/phpdbg/phpdbg_out.c @@ -37,7 +37,7 @@ ZEND_EXTERN_MODULE_GLOBALS(phpdbg) * XXX: this is a magic number; do not decrease it * Emax = 1023 * NDIG = 320 - * NUM_BUF_SIZE >= strlen("-") + Emax + strlrn(".") + NDIG + strlen("E+1023") + 1; + * NUM_BUF_SIZE >= strlen("-") + Emax + strlen(".") + NDIG + strlen("E+1023") + 1; */ #define NUM_BUF_SIZE 2048 diff --git a/sapi/phpdbg/phpdbg_wait.c b/sapi/phpdbg/phpdbg_wait.c index 097d4bc6c77e0..ba026af45da0f 100644 --- a/sapi/phpdbg/phpdbg_wait.c +++ b/sapi/phpdbg/phpdbg_wait.c @@ -125,7 +125,7 @@ void phpdbg_webdata_decompress(char *msg, int len) { PHP_VAR_UNSERIALIZE_INIT(var_hash); if (!php_var_unserialize(&zv, (const unsigned char **) &msg, (unsigned char *) msg + len, &var_hash)) { PHP_VAR_UNSERIALIZE_DESTROY(var_hash); - phpdbg_error("wait", "type=\"invaliddata\" import=\"fail\"", "Malformed serialized was sent to this socket, arborting"); + phpdbg_error("wait", "type=\"invaliddata\" import=\"fail\"", "Malformed serialized was sent to this socket, aborting"); return; } PHP_VAR_UNSERIALIZE_DESTROY(var_hash); diff --git a/sapi/phpdbg/phpdbg_watch.c b/sapi/phpdbg/phpdbg_watch.c index 0968aadafa9e5..fc1d8cf3b7d73 100644 --- a/sapi/phpdbg/phpdbg_watch.c +++ b/sapi/phpdbg/phpdbg_watch.c @@ -663,7 +663,7 @@ void phpdbg_queue_element_for_recreation(phpdbg_watch_element *element) { } } -bool phpdbg_try_readding_watch_element(zval *parent, phpdbg_watch_element *element) { +bool phpdbg_try_re_adding_watch_element(zval *parent, phpdbg_watch_element *element) { zval *zv; HashTable *ht = HT_FROM_ZVP(parent); @@ -688,7 +688,7 @@ bool phpdbg_try_readding_watch_element(zval *parent, phpdbg_watch_element *eleme next = Z_REFVAL_P(next); } - if (!phpdbg_try_readding_watch_element(next, element->child)) { + if (!phpdbg_try_re_adding_watch_element(next, element->child)) { return 0; } } else if (phpdbg_check_watch_diff(WATCH_ON_ZVAL, &element->backup.zv, zv)) { @@ -734,7 +734,7 @@ void phpdbg_dequeue_elements_for_recreation() { } else { ZVAL_ARR(zv, element->parent_container); } - if (!phpdbg_try_readding_watch_element(zv, element)) { + if (!phpdbg_try_re_adding_watch_element(zv, element)) { phpdbg_automatic_dequeue_free(element); } } else { diff --git a/sapi/phpdbg/xml.md b/sapi/phpdbg/xml.md index b62b479cee4d8..bd99b0d3f5b40 100644 --- a/sapi/phpdbg/xml.md +++ b/sapi/phpdbg/xml.md @@ -133,7 +133,7 @@ inactive - by type - op_array: nothing was yet compiled (probably because no execution context set) - - symbol_table: no symbol table present (not yet initiailized or already destructed) + - symbol_table: no symbol table present (not yet initialized or already destructed) - noexec: not in execution - memory_manager: using the native memory manager (malloc, free, realloc) instead of e.g. the Zend MM - notfound: file not found @@ -166,7 +166,7 @@ break / info break - id: the breakpoint id (if the leave command was executed, the id has the value "leave") - num: the nth opline of a function/method/file -- add: has value "success"/"fail": a brekpoint was successfully/not added +- add: has value "success"/"fail": a breakpoint was successfully/not added - pending: the breakpoint is waiting for resolving (e.g. a file opline on a not yet loaded file) - deleted: has value "success"/"fail": a breakpoint was successfully/not deleted - eval: the condition on conditional breakpoints @@ -366,7 +366,7 @@ print - if the type is "User" - it has these attributes - startline: the first line of code where the method or function is defined - - endline: the lastt line of code where the method or function is defined + - endline: the last line of code where the method or function is defined - file: the file of code where the method or function is defined - is followed by the oplines of that method or function (<print> elements) - <print line="%u" opline="%p" opcode="%s" op="%s" /> @@ -516,7 +516,7 @@ set ### prompt ### -- without other args, a <setpromt str="" /> tag is emitted where the value of the str attribute is the value of the prompt +- without other args, a <setprompt str="" /> tag is emitted where the value of the str attribute is the value of the prompt - when there is another arg, the prompt is changed to that arg, no further xml answer ### break ### @@ -558,7 +558,7 @@ set - generally enables / disables quietness silently with no further xml answer - if the boolean switch is omitted, it emits current state in a <setquiet active="" /> where active is on or off -### setpping ### +### stepping ### - sets stepping to either opcode or line (so a step command will either advance one op or one line) - if no further argument is passed, it emits current state in a <setoplog type="" /> where active is opcode or line diff --git a/tests/basic/028.phpt b/tests/basic/028.phpt index 37d6f21a0609c..f0a89bf1d2b08 100644 --- a/tests/basic/028.phpt +++ b/tests/basic/028.phpt @@ -1,5 +1,5 @@ --TEST-- -RFC1867 character quotting +RFC1867 character quoting --INI-- file_uploads=1 max_input_vars=1000 diff --git a/tests/basic/bug31875.phpt b/tests/basic/bug31875.phpt index c8ad25ec9f62c..0fdc134d6373b 100644 --- a/tests/basic/bug31875.phpt +++ b/tests/basic/bug31875.phpt @@ -8,7 +8,7 @@ disable_functions=dl diff --git a/tests/lang/026.phpt b/tests/lang/026.phpt index eb2d6214de670..87503adeedda2 100644 --- a/tests/lang/026.phpt +++ b/tests/lang/026.phpt @@ -1,5 +1,5 @@ --TEST-- -Testing string scanner confirmance +Testing string scanner conformance --FILE-- --EXPECT-- diff --git a/tests/lang/bug20175.phpt b/tests/lang/bug20175.phpt index 5ab5677dd6411..e1718708a72aa 100644 --- a/tests/lang/bug20175.phpt +++ b/tests/lang/bug20175.phpt @@ -10,7 +10,7 @@ print zend_version()."\n"; * Storing the result of a function in a static variable. * foo_global() increments global variable $foo_count whenever it is executed. * When foo_static() is called it checks for the static variable $foo_value - * being initialised. In case initialisation is necessary foo_global() will be + * being initialized. In case initialisation is necessary foo_global() will be * called. Since that must happen only once the return value should be equal. */ $foo_count = 0; @@ -58,8 +58,8 @@ function bar_static() { * * Storing a reference to the result of a function in a static variable. * Same as Part 2 but wow_global() returns a reference so $wow_value - * should store a reference to $wow_global. Therefor $wow_value is already - * initialised in second call to wow_static() and hence shouldn't call + * should store a reference to $wow_global. Therefore $wow_value is already + * initialized in second call to wow_static() and hence shouldn't call * wow_global() again. */ /* $wow_count = 0; @@ -89,7 +89,7 @@ function wow_static() { * The class oop_test uses a static reference to a oop_class instance. * When another oop_test instance is created it must reuse the statically * stored reference oop_value. This way oop_class gets some singleton behavior - * since it will be created only once for all insatnces of oop_test. + * since it will be created only once for all instances of oop_test. */ $oop_global = 0; class oop_class { diff --git a/tests/lang/bug25145.phpt b/tests/lang/bug25145.phpt index 9c533871a84d8..70b222e27c6e4 100644 --- a/tests/lang/bug25145.phpt +++ b/tests/lang/bug25145.phpt @@ -1,5 +1,5 @@ --TEST-- -Bug #25145 (SEGV on recpt of form input with name like "123[]") +Bug #25145 (SEGV on receipt of form input with name like "123[]") --GET-- 123[]=SEGV --FILE-- diff --git a/tests/lang/bug30578.phpt b/tests/lang/bug30578.phpt index dc9eeeaae4c54..70580871039da 100644 --- a/tests/lang/bug30578.phpt +++ b/tests/lang/bug30578.phpt @@ -1,5 +1,5 @@ --TEST-- -Bug #30578 (Output buffers flushed before calling __desctruct functions) +Bug #30578 (Output buffers flushed before calling __destruct functions) --FILE-- --EXPECTF--
-Warning: require_once(nonexisiting.php) [function.require-once.html]: Failed to open stream: No such file or directory in %sbug35176.php on line 2
+Warning: require_once(nonexistent.php) [function.require-once.html]: Failed to open stream: No such file or directory in %sbug35176.php on line 2

-Fatal error: Uncaught Error: Failed opening required 'nonexisiting.php' (include_path='%s') in %s:%d +Fatal error: Uncaught Error: Failed opening required 'nonexistent.php' (include_path='%s') in %s:%d Stack trace: #0 {main} thrown in %sbug35176.php on line 2
diff --git a/tests/lang/operators/overloaded_property_ref.phpt b/tests/lang/operators/overloaded_property_ref.phpt index 8a158fc0fdd48..d9b2c25cfb23c 100644 --- a/tests/lang/operators/overloaded_property_ref.phpt +++ b/tests/lang/operators/overloaded_property_ref.phpt @@ -1,5 +1,5 @@ --TEST-- -Operators on overlaoded property reference +Operators on overloaded property reference --FILE-- refs($u1[0], $u2[0][1]); var_dump($u1, $u2); ?> --EXPECT-- ----- Pass uninitialised array & object by ref: function call --- +---- Pass uninitialized array & object by ref: function call --- array(1) { [0]=> string(12) "Ref1 changed" @@ -63,7 +63,7 @@ array(1) { } } - ---- Pass uninitialised arrays & objects by ref: static method call --- + ---- Pass uninitialized arrays & objects by ref: static method call --- array(1) { [0]=> string(12) "Ref1 changed" @@ -77,7 +77,7 @@ array(1) { } ----- Pass uninitialised arrays & objects by ref: constructor --- +---- Pass uninitialized arrays & objects by ref: constructor --- array(1) { [0]=> string(12) "Ref1 changed" @@ -90,7 +90,7 @@ array(1) { } } - ---- Pass uninitialised arrays & objects by ref: instance method call --- + ---- Pass uninitialized arrays & objects by ref: instance method call --- array(1) { [0]=> string(12) "Ref1 changed" diff --git a/tests/lang/static_basic_001.phpt b/tests/lang/static_basic_001.phpt index 6a3ea1aa68905..0916029d74910 100644 --- a/tests/lang/static_basic_001.phpt +++ b/tests/lang/static_basic_001.phpt @@ -21,11 +21,11 @@ function manyInits() { static $counter=0; echo "------------- Call $counter --------------\n"; static $a, $b=10, $c=20, $d, $e=30; - echo "Unitialised : $a\n"; - echo "Initialised to 10: $b\n"; - echo "Initialised to 20: $c\n"; - echo "Unitialised : $d\n"; - echo "Initialised to 30: $e\n"; + echo "Uninitialized : $a\n"; + echo "Initialized to 10: $b\n"; + echo "Initialized to 20: $c\n"; + echo "Uninitialized : $d\n"; + echo "Initialized to 30: $e\n"; $a++; $b++; $c++; @@ -59,23 +59,23 @@ Same variable used as static and non static. Lots of initialisations in the same statement. ------------- Call 0 -------------- -Unitialised : -Initialised to 10: 10 -Initialised to 20: 20 -Unitialised : -Initialised to 30: 30 +Uninitialized : +Initialized to 10: 10 +Initialized to 20: 20 +Uninitialized : +Initialized to 30: 30 ------------- Call 1 -------------- -Unitialised : 1 -Initialised to 10: 11 -Initialised to 20: 21 -Unitialised : 1 -Initialised to 30: 31 +Uninitialized : 1 +Initialized to 10: 11 +Initialized to 20: 21 +Uninitialized : 1 +Initialized to 30: 31 ------------- Call 2 -------------- -Unitialised : 2 -Initialised to 10: 12 -Initialised to 20: 22 -Unitialised : 2 -Initialised to 30: 32 +Uninitialized : 2 +Initialized to 10: 12 +Initialized to 20: 22 +Uninitialized : 2 +Initialized to 30: 32 Using static keyword at global scope 10 diff --git a/tests/security/open_basedir_001.phpt b/tests/security/open_basedir_001.phpt index a68e9ac531218..8468b3fd1f3d1 100644 --- a/tests/security/open_basedir_001.phpt +++ b/tests/security/open_basedir_001.phpt @@ -1,5 +1,5 @@ --TEST-- -openbase_dir runtime tightning +openbase_dir runtime hardening --SKIPIF--