diff --git a/ext/intl/spoofchecker/spoofchecker_main.c b/ext/intl/spoofchecker/spoofchecker_main.c index afea503bc0e4b..a4b1ad591fdd6 100644 --- a/ext/intl/spoofchecker/spoofchecker_main.c +++ b/ext/intl/spoofchecker/spoofchecker_main.c @@ -136,7 +136,6 @@ PHP_METHOD(Spoofchecker, setChecks) /* }}} */ #if U_ICU_VERSION_MAJOR_NUM >= 58 -/* TODO Document this method on PHP.net */ /* {{{ Set the loosest restriction level allowed for strings. */ PHP_METHOD(Spoofchecker, setRestrictionLevel) { diff --git a/ext/standard/array.c b/ext/standard/array.c index 0ef700f14a746..605c21b2012c1 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -3869,7 +3869,6 @@ static inline Bucket* find_bucket_at_offset(HashTable* ht, zend_long offset) ZEND_ASSERT(offset >= 0 && offset <= ht->nNumOfElements); if (HT_IS_WITHOUT_HOLES(ht)) { /* There's no need to iterate over the array to filter out holes if there are no holes */ - /* This properly handles both packed and unpacked arrays. */ return ht->arData + offset; } /* Otherwise, this code has to iterate over the HashTable and skip holes in the array. */ @@ -3896,7 +3895,6 @@ static inline zval* find_packed_val_at_offset(HashTable* ht, zend_long offset) ZEND_ASSERT(offset >= 0 && offset <= ht->nNumOfElements); if (HT_IS_WITHOUT_HOLES(ht)) { /* There's no need to iterate over the array to filter out holes if there are no holes */ - /* This properly handles both packed and unpacked arrays. */ return ht->arPacked + offset; } /* Otherwise, this code has to iterate over the HashTable and skip holes in the array. */ diff --git a/main/main.c b/main/main.c index e33ef29d61bb7..6d29d3462b517 100644 --- a/main/main.c +++ b/main/main.c @@ -127,8 +127,8 @@ PHPAPI char *php_get_version(sapi_module_struct *sapi_module) { smart_string version_info = {0}; smart_string_append_printf(&version_info, - "PHP %s (%s) (built: %s) (%s)\n", - PHP_VERSION, sapi_module->name, php_build_date, + "PHP " PHP_VERSION " (%s) (built: %s) (%s)\n", + sapi_module->name, php_build_date, #ifdef ZTS "ZTS" #else @@ -148,8 +148,12 @@ PHPAPI char *php_get_version(sapi_module_struct *sapi_module) #endif ); smart_string_appends(&version_info, "Copyright (c) The PHP Group\n"); - if (php_build_provider()) { - smart_string_append_printf(&version_info, "Built by %s\n", php_build_provider()); + + const char *build_provider = php_build_provider(); + if (build_provider) { + smart_string_appends(&version_info, "Built by "); + smart_string_appends(&version_info, build_provider); + smart_string_appendc(&version_info, '\n'); } smart_string_appends(&version_info, get_zend_version()); smart_string_0(&version_info); @@ -160,7 +164,7 @@ PHPAPI char *php_get_version(sapi_module_struct *sapi_module) PHPAPI void php_print_version(sapi_module_struct *sapi_module) { char *version_info = php_get_version(sapi_module); - php_printf("%s", version_info); + PHPWRITE(version_info, strlen(version_info)); efree(version_info); }