Skip to content

Commit f16cb38

Browse files
committed
Merge remote-tracking branch 'upstream/master' into support-noreturn
2 parents f59ec6d + f1ad919 commit f16cb38

File tree

255 files changed

+4379
-2701
lines changed

Some content is hidden

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

255 files changed

+4379
-2701
lines changed

.travis.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,6 @@ env:
6868

6969
jobs:
7070
include:
71-
- env: ENABLE_ZTS=0 ENABLE_DEBUG=0
72-
arch: amd64
73-
if: type = cron
74-
- env: ENABLE_ZTS=1 ENABLE_DEBUG=1
75-
arch: amd64
76-
if: type = cron
7771
- env: ENABLE_ZTS=1 ENABLE_DEBUG=1 SKIP_IO_CAPTURE_TESTS=1 ARM64=1
7872
arch: arm64
7973
if: type = cron

CODING_STANDARDS.md

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

99
## Code implementation

NEWS

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

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

8484
- OpenSSL:

TSRM/tsrm_win32.c

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

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

UPGRADING

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ PHP 8.1 UPGRADE NOTES
9191
for details of behavior changes and how to explicitly set this attribute. To
9292
keep the old behavior, use mysqli_report(MYSQLI_REPORT_OFF);
9393
RFC: https://wiki.php.net/rfc/mysqli_default_errmode
94+
. Classes extending mysqli_stmt::execute() will be required to specify the
95+
additional parameter now.
96+
RFC: https://wiki.php.net/rfc/mysqli_bind_in_execute
9497

9598
- MySQLnd:
9699
. The mysqlnd.fetch_copy_data ini setting has been removed. However, this
@@ -113,12 +116,12 @@ PHP 8.1 UPGRADE NOTES
113116
- PDO SQLite:
114117
. Integers and floats in results sets will now be returned using native PHP
115118
types. You can restore the previous behavior by enabling the
116-
PDO::ATTR_STRINGFIY_FETCHES option.
119+
PDO::ATTR_STRINGIFY_FETCHES option.
117120

118121
- Standard:
119122
. version_compare() no longer accepts undocumented operator abbreviations.
120123
. htmlspecialchars(), htmlentities(), htmlspecialchars_decode(),
121-
html_entitity_decode() and get_html_translation_table() now use
124+
html_entity_decode() and get_html_translation_table() now use
122125
ENT_QUOTES | ENT_SUBSTITUTE rather than ENT_COMPAT by default. This means
123126
that ' is escaped to ' while previously it was left alone.
124127
Additionally, malformed UTF-8 will be replaced by a Unicode substitution
@@ -187,7 +190,7 @@ PHP 8.1 UPGRADE NOTES
187190
echo $h, "\n";
188191
```
189192

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

192195
. Added xxHash. The implementation brings in the following arguments
193196

@@ -218,6 +221,9 @@ PHP 8.1 UPGRADE NOTES
218221
used to specify a directory from which files are allowed to be loaded. It
219222
is only meaningful if mysqli.allow_local_infile is not enabled, as all
220223
directories are allowed in that case.
224+
. Binding in execute has been added to mysqli prepared statements.
225+
Parameters can now be passed to mysqli_stmt::execute as an array.
226+
RFC: https://wiki.php.net/rfc/mysqli_bind_in_execute
221227

222228
- PDO MySQL:
223229
. The PDO::MYSQL_ATTR_LOCAL_INFILE_DIRECTORY attribute has been added, which
@@ -262,7 +268,7 @@ PHP 8.1 UPGRADE NOTES
262268
etc. was changed. Now properties are naturally ordered according to their
263269
declaration and inheritance. Properties declared in a base class are going
264270
to be before the child properties. This order is consistent with internal
265-
layout of properies in zend_objct structure and repeats the order in
271+
layout of properties in zend_object structure and repeats the order in
266272
default_properties_table[] and properties_info_table[]. The old order was
267273
not documented and was caused by class inheritance implementation details.
268274

@@ -283,6 +289,11 @@ PHP 8.1 UPGRADE NOTES
283289
. Added array_is_list(array $array), which will return true if the array keys are 0 .. count($array)-1 in that order.
284290
RFC: https://wiki.php.net/rfc/is_list
285291

292+
- Standard:
293+
. Added fsync() and fdatasync(), which instruct the operating system to
294+
flush its buffers to physical storage.
295+
RFC: https://wiki.php.net/rfc/fsync_function
296+
286297
========================================
287298
7. New Classes and Interfaces
288299
========================================

Zend/Optimizer/block_pass.c

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

Zend/Optimizer/dce.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ int dce_optimize_op_array(zend_op_array *op_array, zend_ssa *ssa, bool reorder_d
542542
}
543543
} FOREACH_PHI_END();
544544

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

Zend/Optimizer/pass1.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx)
111111
|| opline->extended_value == ZEND_DIV
112112
|| opline->extended_value == ZEND_POW) {
113113
if (Z_TYPE(ZEND_OP2_LITERAL(opline)) == IS_STRING) {
114-
/* don't optimise if it should produce a runtime numeric string error */
114+
/* don't optimize if it should produce a runtime numeric string error */
115115
if (is_numeric_string(Z_STRVAL(ZEND_OP2_LITERAL(opline)), Z_STRLEN(ZEND_OP2_LITERAL(opline)), NULL, NULL, 0)) {
116116
convert_scalar_to_number(&ZEND_OP2_LITERAL(opline));
117117
}
@@ -120,7 +120,7 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx)
120120
|| opline->extended_value == ZEND_SL
121121
|| opline->extended_value == ZEND_SR) {
122122
if (Z_TYPE(ZEND_OP2_LITERAL(opline)) != IS_LONG) {
123-
/* don't optimise if it should produce a runtime numeric string error */
123+
/* don't optimize if it should produce a runtime numeric string error */
124124
if (!(Z_TYPE(ZEND_OP2_LITERAL(opline)) == IS_STRING
125125
&& !is_numeric_string(Z_STRVAL(ZEND_OP2_LITERAL(opline)), Z_STRLEN(ZEND_OP2_LITERAL(opline)), NULL, NULL, 0))) {
126126
convert_to_long(&ZEND_OP2_LITERAL(opline));
@@ -235,8 +235,7 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx)
235235
Z_TYPE(ZEND_OP1_LITERAL(opline)) == IS_STRING) {
236236
/* for A::B */
237237
if (op_array->scope &&
238-
!strncasecmp(Z_STRVAL(ZEND_OP1_LITERAL(opline)),
239-
ZSTR_VAL(op_array->scope->name), Z_STRLEN(ZEND_OP1_LITERAL(opline)) + 1)) {
238+
zend_string_equals_ci(Z_STR(ZEND_OP1_LITERAL(opline)), op_array->scope->name)) {
240239
ce = op_array->scope;
241240
} else {
242241
if ((ce = zend_hash_find_ptr(EG(class_table),
@@ -312,7 +311,7 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx)
312311
}
313312
if (send1_opline->opcode != ZEND_SEND_VAL ||
314313
send1_opline->op1_type != IS_CONST) {
315-
/* don't colllect constants after unknown function call */
314+
/* don't collect constants after unknown function call */
316315
collect_constants = 0;
317316
break;
318317
}
@@ -324,7 +323,7 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx)
324323
}
325324
if (send1_opline->opcode != ZEND_SEND_VAL ||
326325
send1_opline->op1_type != IS_CONST) {
327-
/* don't colllect constants after unknown function call */
326+
/* don't collect constants after unknown function call */
328327
collect_constants = 0;
329328
break;
330329
}
@@ -336,7 +335,7 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx)
336335
if (init_opline->opcode != ZEND_INIT_FCALL ||
337336
init_opline->op2_type != IS_CONST ||
338337
Z_TYPE(ZEND_OP2_LITERAL(init_opline)) != IS_STRING) {
339-
/* don't colllect constants after unknown function call */
338+
/* don't collect constants after unknown function call */
340339
collect_constants = 0;
341340
break;
342341
}
@@ -505,7 +504,7 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx)
505504
break;
506505
}
507506
}
508-
/* don't colllect constants after any other function call */
507+
/* don't collect constants after any other function call */
509508
collect_constants = 0;
510509
break;
511510
}

Zend/Optimizer/pass3.c

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

Zend/Optimizer/sccp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1942,7 +1942,7 @@ static void sccp_mark_feasible_successors(
19421942
scdf_mark_edge_feasible(scdf, block_num, target);
19431943
return;
19441944
}
1945-
s = 0;
1945+
s = block->successors_count - 1;
19461946
break;
19471947
}
19481948
default:

0 commit comments

Comments
 (0)