Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Zend/zend_API.c
Original file line number Diff line number Diff line change
Expand Up @@ -1785,7 +1785,7 @@ ZEND_API void object_properties_load(zend_object *object, const HashTable *prope
(property_info->flags & ZEND_ACC_STATIC) == 0) {
bool is_typed = ZEND_TYPE_IS_SET(property_info->type);

/* Mimick unserialize behaviour for virtual properties. */
/* Mimic unserialize behaviour for virtual properties. */
if (UNEXPECTED(property_info->flags & ZEND_ACC_VIRTUAL)) {
zend_throw_error(NULL, "Cannot unserialize value for virtual property %s::$%s", ZSTR_VAL(object->ce->name), zend_get_unmangled_property_name(property_info->name));
return;
Expand All @@ -1808,7 +1808,7 @@ ZEND_API void object_properties_load(zend_object *object, const HashTable *prope
ZVAL_COPY(&val, prop);
ZEND_REF_ADD_TYPE_SOURCE(Z_REF_P(&val), property_info);
} else {
/* Mimick zend_assign_to_typed_prop() by reporting the error before doing work. */
/* Mimic zend_assign_to_typed_prop() by reporting the error before doing work. */
if (UNEXPECTED((property_info->flags & ZEND_ACC_READONLY)
&& !Z_ISUNDEF_P(slot)
&& !(Z_PROP_FLAG_P(slot) & IS_PROP_REINITABLE))) {
Expand Down
4 changes: 2 additions & 2 deletions Zend/zend_call_stack.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ static bool zend_call_stack_get_linux_proc_maps(zend_call_stack *stack)
max_size = rlim.rlim_cur;

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

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

5. Read [Logging into Servers](https://github.com/php/infrastructure/blob/main/docs/ServerAccess.rst#logging-into-servers) to set up
Expand Down
2 changes: 1 addition & 1 deletion ext/dom/html_document.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ static void dom_lexbor_libxml2_bridge_tree_error_reporter(
dom_lexbor_libxml2_bridge_application_data *application_data = application_data_voidptr;

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

Expand Down
2 changes: 1 addition & 1 deletion ext/ext_skel.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ function process_args($argv, $argc) {
// Validate vendor
if (!preg_match('/^[a-z][a-z0-9_-]+$/i', $options['vendor'])) {
error('Invalid vendor name. Valid names start with a letter,'
.' followed by any number of letters, numbers, hypens, or underscores.');
.' followed by any number of letters, numbers, hyphens, or underscores.');
}

$options['ext'] = str_replace(['\\', '/'], '', strtolower($options['ext']));
Expand Down
2 changes: 1 addition & 1 deletion ext/ftp/php_ftp.c
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ PHP_FUNCTION(ftp_fget)
}
/* }}} */

/* {{{ Retrieves a file from the FTP server asynchronly and writes it to an open file */
/* {{{ Retrieves a file from the FTP server asynchronously and writes it to an open file */
PHP_FUNCTION(ftp_nb_fget)
{
zval *z_ftp;
Expand Down
2 changes: 1 addition & 1 deletion ext/opcache/ZendAccelerator.c
Original file line number Diff line number Diff line change
Expand Up @@ -3672,7 +3672,7 @@ static zend_result accel_post_startup(void)
}

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

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

// Disable tickets (they won't work anyway) and warn if explicity enabled
// Disable tickets (they won't work anyway) and warn if explicitly enabled
SSL_CTX_set_options(sslsock->ctx, SSL_OP_NO_TICKET);
if (GET_VER_OPT("no_ticket") && !zend_is_true(val)) {
zend_value_error("Session tickets cannot be enabled when session_get_cb is set");
Expand Down
2 changes: 1 addition & 1 deletion ext/pdo/pdo_stmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ static bool pdo_call_fetch_object_constructor(zend_function *constructor, HashTa
}

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

/* decalre the class entry */
/* declare the class entry */
PHPAPI zend_class_entry *spl_ce_SplFileInfo;
PHPAPI zend_class_entry *spl_ce_DirectoryIterator;
PHPAPI zend_class_entry *spl_ce_FilesystemIterator;
Expand Down
10 changes: 5 additions & 5 deletions ext/spl/spl_iterators.c
Original file line number Diff line number Diff line change
Expand Up @@ -1676,14 +1676,14 @@ PHP_METHOD(RecursiveFilterIterator, getChildren)

SPL_FETCH_AND_CHECK_DUAL_IT(intern, ZEND_THIS);

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

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

/* }}} */

/* {{{ Set timeout on stream read to seconds + microseonds */
/* {{{ Set timeout on stream read to seconds + microseconds */
#if defined(HAVE_SYS_TIME_H) || defined(PHP_WIN32)
PHP_FUNCTION(stream_set_timeout)
{
Expand Down
4 changes: 2 additions & 2 deletions main/SAPI.c
Original file line number Diff line number Diff line change
Expand Up @@ -633,11 +633,11 @@ static void sapi_header_add_op(sapi_header_op_enum op, sapi_header_struct *sapi_
char *colon_offset = strchr(sapi_header->header, ':');

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

*colon_offset = 0;
sapi_remove_header(&SG(sapi_headers).headers, sapi_header->header, strlen(sapi_header->header), 0);
*colon_offset = sav;
*colon_offset = saved_char;
}
}
zend_llist_add_element(&SG(sapi_headers).headers, (void *) sapi_header);
Expand Down
2 changes: 1 addition & 1 deletion main/debug_gdb_scripts.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion scripts/gdb/php_gdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
See https://sourceware.org/gdb/current/onlinedocs/gdb.html/Python-Auto_002dloading.html
See https://sourceware.org/gdb/current/onlinedocs/gdb.html/Auto_002dloading-safe-path.html#Auto_002dloading-safe-path
If needed, pretty printers can be by-passed by using the /r flag:
If needed, pretty printers can be bypassed by using the /r flag:
(gdb) p /r any_variable
Use |set print pretty| to enable multi-line printing and indentation:
Expand Down
Loading