Skip to content

Commit e03a3d5

Browse files
committed
Merge branch 'master' of https://git.php.net/repository/php-src
# By Nikita Popov (10) and others # Via Nikita Popov (6) and others * 'master' of https://git.php.net/repository/php-src: (26 commits) Remove some more unnecessary macros from phar Remove PHAR_(Z)STR* usages Remove version checks in phar Fix two warnings Provide more macros for handling of interned strings Make use of Z_*VAL and ZVAL_* in language scanner Make consistent use of Z_*VAL macros in compiler fix broken sha2 configure tests fix broken sha2 configure tests Small cleanup in class name resolution of compiler Fixed minor bug in test. Move NEWS entries to correct version Fix bug #64782: SplFileObject constructor make $context optional Prepare pdo_firebird for a pecl release also Fix bug #65502: DateTimeImmutable::createFromFormat returns DateTime Fix bug #65548: Comparison for DateTimeImmutable doesn't work Sort the NEWS file alphabetically. Request non-keep-alive connections by default in HTTP 1.1 requests. Allow CURLOPT_FOLLOWLOCATION to be used with open_basedir. Tinker with the wording of the short_open_tag description. ...
2 parents ac519ea + db6d93f commit e03a3d5

Some content is hidden

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

47 files changed

+1191
-1993
lines changed

NEWS

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ PHP NEWS
1010
of E_STRICT (phase 1 of RFC: https://wiki.php.net/rfc/incompat_ctx).
1111
(Gustavo)
1212

13-
- Session:
14-
. Fixed Bug #65315 (session.hash_function silently fallback to default md5)
15-
(Yasuo)
16-
. Implemented Request #54649 (Create session_serializer_name()). (Yasuo)
17-
. Implemented Request #17860 (Session write short circuit). (Yasuo)
18-
. Implemented Request #20421 (session_abort() and session_reset() function).
19-
(Yasuo)
20-
. Implemented Request #11100 (session_gc() function). (Yasuo)
13+
- cURL:
14+
. Implemented FR #65646 (re-enable CURLOPT_FOLLOWLOCATION with open_basedir
15+
or safe_mode). (Adam)
16+
17+
- GMP:
18+
. Moved GMP to use object as the underlying structure and implemented various
19+
improvements based on this.
20+
(RFC: https://wiki.php.net/rfc/operator_overloading_gmp). (Nikita)
2121

2222
- mysqlnd:
2323
. Disabled flag for SP OUT variables for 5.5+ servers as they are not natively
@@ -35,9 +35,17 @@ PHP NEWS
3535
. Fixed Bug #63657 (pgsqlCopyFromFile, pgsqlCopyToArray use Postgres < 7.3
3636
syntax). (Matteo)
3737

38-
- GMP:
39-
. Moved GMP to use object as the underlying structure and implemented various
40-
improvements based on this.
41-
(RFC: https://wiki.php.net/rfc/operator_overloading_gmp). (Nikita)
38+
- Session:
39+
. Fixed Bug #65315 (session.hash_function silently fallback to default md5)
40+
(Yasuo)
41+
. Implemented Request #54649 (Create session_serializer_name()). (Yasuo)
42+
. Implemented Request #17860 (Session write short circuit). (Yasuo)
43+
. Implemented Request #20421 (session_abort() and session_reset() function).
44+
(Yasuo)
45+
. Implemented Request #11100 (session_gc() function). (Yasuo)
46+
47+
- Standard:
48+
. Implemented FR #65634 (HTTP wrapper is very slow with protocol_version
49+
1.1). (Adam)
4250

4351
<<< NOTE: Insert NEWS from last stable release here prior to actual release! >>>

UPGRADING

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,7 @@ PHP X.Y UPGRADE NOTES
9898

9999
- File upload:
100100
Uploads equal or greater than 2GB in size are now accepted.
101+
102+
- HTTP stream wrapper:
103+
HTTP 1.1 requests now include a Connection: close header unless explicitly
104+
overridden by setting a Connection header via the header context option.

Zend/zend.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -670,8 +670,8 @@ END_EXTERN_C()
670670

671671
/* FIXME: Check if we can save if (ptr) too */
672672

673-
#define STR_FREE(ptr) if (ptr && !IS_INTERNED(ptr)) { efree(ptr); }
674-
#define STR_FREE_REL(ptr) if (ptr && !IS_INTERNED(ptr)) { efree_rel(ptr); }
673+
#define STR_FREE(ptr) if (ptr) { str_efree(ptr); }
674+
#define STR_FREE_REL(ptr) if (ptr) { str_efree_rel(ptr); }
675675

676676
#define STR_EMPTY_ALLOC() estrndup("", sizeof("")-1)
677677

Zend/zend_API.c

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2029,14 +2029,15 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio
20292029
const zend_function_entry *ptr = functions;
20302030
zend_function function, *reg_function;
20312031
zend_internal_function *internal_function = (zend_internal_function *)&function;
2032-
int count=0, unload=0, result=0;
2032+
int count=0, unload=0;
20332033
HashTable *target_function_table = function_table;
20342034
int error_type;
20352035
zend_function *ctor = NULL, *dtor = NULL, *clone = NULL, *__get = NULL, *__set = NULL, *__unset = NULL, *__isset = NULL, *__call = NULL, *__callstatic = NULL, *__tostring = NULL;
20362036
const char *lowercase_name;
20372037
int fname_len;
20382038
const char *lc_class_name = NULL;
20392039
int class_name_len = 0;
2040+
zend_ulong hash;
20402041

20412042
if (type==MODULE_PERSISTENT) {
20422043
error_type = E_CORE_WARNING;
@@ -2135,12 +2136,8 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio
21352136
}
21362137
fname_len = strlen(ptr->fname);
21372138
lowercase_name = zend_new_interned_string(zend_str_tolower_dup(ptr->fname, fname_len), fname_len + 1, 1 TSRMLS_CC);
2138-
if (IS_INTERNED(lowercase_name)) {
2139-
result = zend_hash_quick_add(target_function_table, lowercase_name, fname_len+1, INTERNED_HASH(lowercase_name), &function, sizeof(zend_function), (void**)&reg_function);
2140-
} else {
2141-
result = zend_hash_add(target_function_table, lowercase_name, fname_len+1, &function, sizeof(zend_function), (void**)&reg_function);
2142-
}
2143-
if (result == FAILURE) {
2139+
hash = str_hash(lowercase_name, fname_len);
2140+
if (zend_hash_quick_add(target_function_table, lowercase_name, fname_len+1, hash, &function, sizeof(zend_function), (void**)&reg_function) == FAILURE) {
21442141
unload=1;
21452142
str_efree(lowercase_name);
21462143
break;
@@ -2493,6 +2490,7 @@ static zend_class_entry *do_register_internal_class(zend_class_entry *orig_class
24932490
{
24942491
zend_class_entry *class_entry = malloc(sizeof(zend_class_entry));
24952492
char *lowercase_name = emalloc(orig_class_entry->name_length + 1);
2493+
zend_ulong hash;
24962494
*class_entry = *orig_class_entry;
24972495

24982496
class_entry->type = ZEND_INTERNAL_CLASS;
@@ -2506,11 +2504,8 @@ static zend_class_entry *do_register_internal_class(zend_class_entry *orig_class
25062504

25072505
zend_str_tolower_copy(lowercase_name, orig_class_entry->name, class_entry->name_length);
25082506
lowercase_name = (char*)zend_new_interned_string(lowercase_name, class_entry->name_length + 1, 1 TSRMLS_CC);
2509-
if (IS_INTERNED(lowercase_name)) {
2510-
zend_hash_quick_update(CG(class_table), lowercase_name, class_entry->name_length+1, INTERNED_HASH(lowercase_name), &class_entry, sizeof(zend_class_entry *), NULL);
2511-
} else {
2512-
zend_hash_update(CG(class_table), lowercase_name, class_entry->name_length+1, &class_entry, sizeof(zend_class_entry *), NULL);
2513-
}
2507+
hash = str_hash(lowercase_name, class_entry->name_length);
2508+
zend_hash_quick_update(CG(class_table), lowercase_name, class_entry->name_length+1, hash, &class_entry, sizeof(zend_class_entry *), NULL);
25142509
str_efree(lowercase_name);
25152510
return class_entry;
25162511
}

Zend/zend_builtin_functions.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ ZEND_FUNCTION(define)
706706
zval_ptr_dtor(&val_free);
707707
}
708708
c.flags = case_sensitive; /* non persistent */
709-
c.name = IS_INTERNED(name) ? name : zend_strndup(name, name_len);
709+
c.name = str_strndup(name, name_len);
710710
if(c.name == NULL) {
711711
RETURN_FALSE;
712712
}
@@ -1388,12 +1388,11 @@ ZEND_FUNCTION(function_exists)
13881388
Creates an alias for user defined class */
13891389
ZEND_FUNCTION(class_alias)
13901390
{
1391-
char *class_name, *lc_name, *alias_name;
1391+
char *class_name, *alias_name;
13921392
zend_class_entry **ce;
13931393
int class_name_len, alias_name_len;
13941394
int found;
13951395
zend_bool autoload = 1;
1396-
ALLOCA_FLAG(use_heap)
13971396

13981397
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|b", &class_name, &class_name_len, &alias_name, &alias_name_len, &autoload) == FAILURE) {
13991398
return;

0 commit comments

Comments
 (0)