diff --git a/NEWS b/NEWS index be349610ff86..7f3d46f7885d 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,8 @@ PHP NEWS . Fix OSS-Fuzz #429429090 (Failed assertion on unset() with uninitialized container). (ilutov) . Fixed GH-20564 (Don't call autoloaders with pending exception). (ilutov) + . Fix deprecation now showing when accessing null key of an array with JIT. + (alexandre-daubois) - Date: . Update timelib to 2022.16. (Derick) diff --git a/Zend/Optimizer/sccp.c b/Zend/Optimizer/sccp.c index 38a28dcd4889..f7a3c6ab5b9f 100644 --- a/Zend/Optimizer/sccp.c +++ b/Zend/Optimizer/sccp.c @@ -363,8 +363,7 @@ static inline zend_result zval_to_string_offset(zend_long *result, zval *op) { static inline zend_result fetch_array_elem(zval **result, zval *op1, zval *op2) { switch (Z_TYPE_P(op2)) { case IS_NULL: - *result = zend_hash_find(Z_ARR_P(op1), ZSTR_EMPTY_ALLOC()); - return SUCCESS; + return FAILURE; case IS_FALSE: *result = zend_hash_index_find(Z_ARR_P(op1), 0); return SUCCESS; diff --git a/Zend/Optimizer/zend_call_graph.c b/Zend/Optimizer/zend_call_graph.c index 645edd2f9991..884b481aceb8 100644 --- a/Zend/Optimizer/zend_call_graph.c +++ b/Zend/Optimizer/zend_call_graph.c @@ -23,8 +23,6 @@ #include "zend_inference.h" #include "zend_call_graph.h" #include "zend_func_info.h" -#include "zend_inference.h" -#include "zend_call_graph.h" static void zend_op_array_calc(zend_op_array *op_array, void *context) { diff --git a/Zend/Optimizer/zend_func_info.c b/Zend/Optimizer/zend_func_info.c index f3b0d663dd6d..cec52f7e9860 100644 --- a/Zend/Optimizer/zend_func_info.c +++ b/Zend/Optimizer/zend_func_info.c @@ -24,7 +24,6 @@ #include "zend_inference.h" #include "zend_call_graph.h" #include "zend_func_info.h" -#include "zend_inference.h" #ifdef _WIN32 #include "win32/ioutil.h" #endif diff --git a/Zend/zend_autoload.c b/Zend/zend_autoload.c index 253143a9b22d..bc74efa1afda 100644 --- a/Zend/zend_autoload.c +++ b/Zend/zend_autoload.c @@ -28,139 +28,139 @@ ZEND_TLS HashTable *zend_class_autoload_functions; static void zend_autoload_callback_zval_destroy(zval *element) { - zend_fcall_info_cache *fcc = Z_PTR_P(element); - zend_fcc_dtor(fcc); - efree(fcc); + zend_fcall_info_cache *fcc = Z_PTR_P(element); + zend_fcc_dtor(fcc); + efree(fcc); } static Bucket *autoload_find_registered_function(const HashTable *autoloader_table, const zend_fcall_info_cache *function_entry) { - zend_fcall_info_cache *current_function_entry; - ZEND_HASH_MAP_FOREACH_PTR(autoloader_table, current_function_entry) { - if (zend_fcc_equals(current_function_entry, function_entry)) { - return _p; - } - } ZEND_HASH_FOREACH_END(); - return NULL; + zend_fcall_info_cache *current_function_entry; + ZEND_HASH_MAP_FOREACH_PTR(autoloader_table, current_function_entry) { + if (zend_fcc_equals(current_function_entry, function_entry)) { + return _p; + } + } ZEND_HASH_FOREACH_END(); + return NULL; } ZEND_API zend_class_entry *zend_perform_class_autoload(zend_string *class_name, zend_string *lc_name) { - if (!zend_class_autoload_functions) { - return NULL; - } - - zval zname; - ZVAL_STR(&zname, class_name); - - const HashTable *class_autoload_functions = zend_class_autoload_functions; - - /* Cannot use ZEND_HASH_MAP_FOREACH_PTR here as autoloaders may be - * added/removed during autoloading. */ - HashPosition pos; - zend_hash_internal_pointer_reset_ex(class_autoload_functions, &pos); - while (true) { - zend_fcall_info_cache *func_info = zend_hash_get_current_data_ptr_ex(class_autoload_functions, &pos); - if (!func_info) { - break; - } - zend_call_known_fcc(func_info, /* retval */ NULL, /* param_count */ 1, /* params */ &zname, /* named_params */ NULL); - - if (EG(exception)) { - return NULL; - } - if (ZSTR_HAS_CE_CACHE(class_name) && ZSTR_GET_CE_CACHE(class_name)) { - return (zend_class_entry*)ZSTR_GET_CE_CACHE(class_name); - } - - zend_class_entry *ce = zend_hash_find_ptr(EG(class_table), lc_name); - if (ce) { - return ce; - } - - zend_hash_move_forward_ex(class_autoload_functions, &pos); - } - return NULL; + if (!zend_class_autoload_functions) { + return NULL; + } + + zval zname; + ZVAL_STR(&zname, class_name); + + const HashTable *class_autoload_functions = zend_class_autoload_functions; + + /* Cannot use ZEND_HASH_MAP_FOREACH_PTR here as autoloaders may be + * added/removed during autoloading. */ + HashPosition pos; + zend_hash_internal_pointer_reset_ex(class_autoload_functions, &pos); + while (true) { + zend_fcall_info_cache *func_info = zend_hash_get_current_data_ptr_ex(class_autoload_functions, &pos); + if (!func_info) { + break; + } + zend_call_known_fcc(func_info, /* retval */ NULL, /* param_count */ 1, /* params */ &zname, /* named_params */ NULL); + + if (EG(exception)) { + return NULL; + } + if (ZSTR_HAS_CE_CACHE(class_name) && ZSTR_GET_CE_CACHE(class_name)) { + return (zend_class_entry*)ZSTR_GET_CE_CACHE(class_name); + } + + zend_class_entry *ce = zend_hash_find_ptr(EG(class_table), lc_name); + if (ce) { + return ce; + } + + zend_hash_move_forward_ex(class_autoload_functions, &pos); + } + return NULL; } /* Needed for compatibility with spl_register_autoload() */ ZEND_API void zend_autoload_register_class_loader(zend_fcall_info_cache *fcc, bool prepend) { - ZEND_ASSERT(ZEND_FCC_INITIALIZED(*fcc)); - - if (!zend_class_autoload_functions) { - ALLOC_HASHTABLE(zend_class_autoload_functions); - zend_hash_init(zend_class_autoload_functions, 1, NULL, zend_autoload_callback_zval_destroy, false); - /* Initialize as non-packed hash table for prepend functionality. */ - zend_hash_real_init_mixed(zend_class_autoload_functions); - } - - ZEND_ASSERT( - fcc->function_handler->type != ZEND_INTERNAL_FUNCTION - || !zend_string_equals_literal(fcc->function_handler->common.function_name, "spl_autoload_call") - ); - - /* If function is already registered, don't do anything */ - if (autoload_find_registered_function(zend_class_autoload_functions, fcc)) { - /* Release potential call trampoline */ - zend_release_fcall_info_cache(fcc); - return; - } - - zend_fcc_addref(fcc); - zend_hash_next_index_insert_mem(zend_class_autoload_functions, fcc, sizeof(zend_fcall_info_cache)); - if (prepend && zend_hash_num_elements(zend_class_autoload_functions) > 1) { - /* Move the newly created element to the head of the hashtable */ - ZEND_ASSERT(!HT_IS_PACKED(zend_class_autoload_functions)); - Bucket tmp = zend_class_autoload_functions->arData[zend_class_autoload_functions->nNumUsed-1]; - memmove(zend_class_autoload_functions->arData + 1, zend_class_autoload_functions->arData, sizeof(Bucket) * (zend_class_autoload_functions->nNumUsed - 1)); - zend_class_autoload_functions->arData[0] = tmp; - zend_hash_rehash(zend_class_autoload_functions); - } + ZEND_ASSERT(ZEND_FCC_INITIALIZED(*fcc)); + + if (!zend_class_autoload_functions) { + ALLOC_HASHTABLE(zend_class_autoload_functions); + zend_hash_init(zend_class_autoload_functions, 1, NULL, zend_autoload_callback_zval_destroy, false); + /* Initialize as non-packed hash table for prepend functionality. */ + zend_hash_real_init_mixed(zend_class_autoload_functions); + } + + ZEND_ASSERT( + fcc->function_handler->type != ZEND_INTERNAL_FUNCTION + || !zend_string_equals_literal(fcc->function_handler->common.function_name, "spl_autoload_call") + ); + + /* If function is already registered, don't do anything */ + if (autoload_find_registered_function(zend_class_autoload_functions, fcc)) { + /* Release potential call trampoline */ + zend_release_fcall_info_cache(fcc); + return; + } + + zend_fcc_addref(fcc); + zend_hash_next_index_insert_mem(zend_class_autoload_functions, fcc, sizeof(zend_fcall_info_cache)); + if (prepend && zend_hash_num_elements(zend_class_autoload_functions) > 1) { + /* Move the newly created element to the head of the hashtable */ + ZEND_ASSERT(!HT_IS_PACKED(zend_class_autoload_functions)); + Bucket tmp = zend_class_autoload_functions->arData[zend_class_autoload_functions->nNumUsed-1]; + memmove(zend_class_autoload_functions->arData + 1, zend_class_autoload_functions->arData, sizeof(Bucket) * (zend_class_autoload_functions->nNumUsed - 1)); + zend_class_autoload_functions->arData[0] = tmp; + zend_hash_rehash(zend_class_autoload_functions); + } } ZEND_API bool zend_autoload_unregister_class_loader(const zend_fcall_info_cache *fcc) { - if (zend_class_autoload_functions) { - Bucket *p = autoload_find_registered_function(zend_class_autoload_functions, fcc); - if (p) { - zend_hash_del_bucket(zend_class_autoload_functions, p); - return true; - } - } - return false; + if (zend_class_autoload_functions) { + Bucket *p = autoload_find_registered_function(zend_class_autoload_functions, fcc); + if (p) { + zend_hash_del_bucket(zend_class_autoload_functions, p); + return true; + } + } + return false; } /* We do not return a HashTable* because zend_empty_array is not collectable, * therefore the zval holding this value must do so. Something that ZVAL_EMPTY_ARRAY(); does. */ ZEND_API void zend_autoload_fcc_map_to_callable_zval_map(zval *return_value) { - if (zend_class_autoload_functions) { - zend_fcall_info_cache *fcc; - - zend_array *map = zend_new_array(zend_hash_num_elements(zend_class_autoload_functions)); - ZEND_HASH_MAP_FOREACH_PTR(zend_class_autoload_functions, fcc) { - zval tmp; - zend_get_callable_zval_from_fcc(fcc, &tmp); - zend_hash_next_index_insert(map, &tmp); - } ZEND_HASH_FOREACH_END(); - RETURN_ARR(map); - } - RETURN_EMPTY_ARRAY(); + if (zend_class_autoload_functions) { + zend_fcall_info_cache *fcc; + + zend_array *map = zend_new_array(zend_hash_num_elements(zend_class_autoload_functions)); + ZEND_HASH_MAP_FOREACH_PTR(zend_class_autoload_functions, fcc) { + zval tmp; + zend_get_callable_zval_from_fcc(fcc, &tmp); + zend_hash_next_index_insert(map, &tmp); + } ZEND_HASH_FOREACH_END(); + RETURN_ARR(map); + } + RETURN_EMPTY_ARRAY(); } /* Only for deprecated strange behaviour of spl_autoload_unregister() */ ZEND_API void zend_autoload_clean_class_loaders(void) { - if (zend_class_autoload_functions) { - /* Don't destroy the hash table, as we might be iterating over it right now. */ - zend_hash_clean(zend_class_autoload_functions); - } + if (zend_class_autoload_functions) { + /* Don't destroy the hash table, as we might be iterating over it right now. */ + zend_hash_clean(zend_class_autoload_functions); + } } void zend_autoload_shutdown(void) { - if (zend_class_autoload_functions) { - zend_hash_destroy(zend_class_autoload_functions); - FREE_HASHTABLE(zend_class_autoload_functions); - zend_class_autoload_functions = NULL; - } + if (zend_class_autoload_functions) { + zend_hash_destroy(zend_class_autoload_functions); + FREE_HASHTABLE(zend_class_autoload_functions); + zend_class_autoload_functions = NULL; + } } diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index fb04387a0045..d2d0090a7073 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -7896,7 +7896,7 @@ static bool zend_property_hook_uses_property(const zend_string *property_name, c return context.uses_property; } -static bool zend_property_is_virtual(const zend_class_entry *ce, const zend_string *property_name, zend_ast *hooks_ast, uint32_t flags) +static bool zend_property_is_virtual(const zend_class_entry *ce, const zend_string *property_name, zend_ast *hooks_ast) { if (ce->ce_flags & ZEND_ACC_INTERFACE) { return true; @@ -8172,7 +8172,7 @@ static void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast, uint32 doc_comment_ast ? zend_string_copy(zend_ast_get_str(doc_comment_ast)) : NULL; zend_property_info *prop = zend_declare_typed_property( scope, name, &default_value, - property_flags | (zend_property_is_virtual(scope, name, hooks_ast, property_flags) ? ZEND_ACC_VIRTUAL : 0) | ZEND_ACC_PROMOTED, + property_flags | (zend_property_is_virtual(scope, name, hooks_ast) ? ZEND_ACC_VIRTUAL : 0) | ZEND_ACC_PROMOTED, doc_comment, type); if (hooks_ast) { const zend_ast_list *hooks = zend_ast_get_list(hooks_ast); @@ -9074,7 +9074,7 @@ static void zend_compile_prop_decl(zend_ast *ast, zend_ast *type_ast, uint32_t f zend_string *doc_comment = NULL; zval value_zv; zend_type type = ZEND_TYPE_INIT_NONE(0); - flags |= zend_property_is_virtual(ce, name, hooks_ast, flags) ? ZEND_ACC_VIRTUAL : 0; + flags |= zend_property_is_virtual(ce, name, hooks_ast) ? ZEND_ACC_VIRTUAL : 0; zend_string *old_active_property_info_name = CG(context).active_property_info_name; CG(context).active_property_info_name = name; diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index 6075ae3d1e5d..006a89597aed 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -1031,12 +1031,6 @@ void zend_assert_valid_class_name(const zend_string *const_name, const char *typ zend_string *zend_type_to_string_resolved(zend_type type, zend_class_entry *scope); ZEND_API zend_string *zend_type_to_string(zend_type type); -/* BEGIN: OPCODES */ - -#include "zend_vm_opcodes.h" - -/* END: OPCODES */ - /* class fetches */ #define ZEND_FETCH_CLASS_DEFAULT 0 #define ZEND_FETCH_CLASS_SELF 1 diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 62a55b4df528..79785d3ced61 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -575,6 +575,10 @@ static int curl_fnmatch(void *ctx, const char *pattern, const char *string) zval argv[3]; zval retval; + if (!ZEND_FCC_INITIALIZED(ch->handlers.fnmatch)) { + return rval; + } + GC_ADDREF(&ch->std); ZVAL_OBJ(&argv[0], &ch->std); ZVAL_STRING(&argv[1], pattern); @@ -606,6 +610,9 @@ static int curl_progress(void *clientp, double dltotal, double dlnow, double ult fprintf(stderr, "curl_progress() called\n"); fprintf(stderr, "clientp = %x, dltotal = %f, dlnow = %f, ultotal = %f, ulnow = %f\n", clientp, dltotal, dlnow, ultotal, ulnow); #endif + if (!ZEND_FCC_INITIALIZED(ch->handlers.progress)) { + return rval; + } zval args[5]; zval retval; @@ -644,6 +651,9 @@ static int curl_xferinfo(void *clientp, curl_off_t dltotal, curl_off_t dlnow, cu fprintf(stderr, "curl_xferinfo() called\n"); fprintf(stderr, "clientp = %x, dltotal = %ld, dlnow = %ld, ultotal = %ld, ulnow = %ld\n", clientp, dltotal, dlnow, ultotal, ulnow); #endif + if (!ZEND_FCC_INITIALIZED(ch->handlers.xferinfo)) { + return rval; + } zval argv[5]; zval retval; diff --git a/ext/curl/tests/gh21023.phpt b/ext/curl/tests/gh21023.phpt new file mode 100644 index 000000000000..9647bd7baadd --- /dev/null +++ b/ext/curl/tests/gh21023.phpt @@ -0,0 +1,27 @@ +--TEST-- +GH-21023 (crash with CURLOPT_XFERINFOFUNCTION set with an invalid callback) +--EXTENSIONS-- +curl +--FILE-- + +--EXPECT-- +OK diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c index 0105106d9531..5a0e1f3c7a09 100644 --- a/ext/libxml/libxml.c +++ b/ext/libxml/libxml.c @@ -35,7 +35,6 @@ #include #include #include -#include #include #ifdef LIBXML_SCHEMAS_ENABLED #include diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c index 26264aa2b170..b171986d29ce 100644 --- a/ext/mysqli/mysqli.c +++ b/ext/mysqli/mysqli.c @@ -32,7 +32,6 @@ #include "zend_exceptions.h" #include "ext/spl/spl_exceptions.h" #include "zend_interfaces.h" -#include "zend_attributes.h" #include "mysqli_arginfo.h" ZEND_DECLARE_MODULE_GLOBALS(mysqli) diff --git a/ext/opcache/jit/ir/ir_gcm.c b/ext/opcache/jit/ir/ir_gcm.c index 67c97611eaac..1a9e618823b3 100644 --- a/ext/opcache/jit/ir/ir_gcm.c +++ b/ext/opcache/jit/ir/ir_gcm.c @@ -262,7 +262,7 @@ static bool ir_split_partially_dead_node(ir_ctx *ctx, ir_ref ref, uint32_t b) #endif /* 1.2. Iteratively check the predecessors of already found TOTALLY_USEFUL blocks and - * add them into TOTALLY_USEFUL set if all of their sucessors are already there. + * add them into TOTALLY_USEFUL set if all of their successors are already there. */ IR_SPARSE_SET_FOREACH(&data->totally_useful, i) { _push_predecessors(ctx, &ctx->cfg_blocks[i], data); diff --git a/ext/opcache/tests/jit/fetch_dim_r_001.phpt b/ext/opcache/tests/jit/fetch_dim_r_001.phpt index 3ff56263db68..819ec7edca65 100644 --- a/ext/opcache/tests/jit/fetch_dim_r_001.phpt +++ b/ext/opcache/tests/jit/fetch_dim_r_001.phpt @@ -30,7 +30,7 @@ function foo() { } foo(); ?> ---EXPECT-- +--EXPECTF-- int(1) int(3) int(2) @@ -38,6 +38,8 @@ int(1) int(3) int(1) int(2) + +Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line %d int(4) int(5) int(5) diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index 5dd1dc4090cd..2d8ee9c435ed 100644 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -27,7 +27,6 @@ #include "main/SAPI.h" #include "zend_exceptions.h" #include "zend_interfaces.h" -#include "zend_exceptions.h" static zend_class_entry *phar_ce_archive; static zend_class_entry *phar_ce_data; diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 1d7f2c1a9b59..d96de3947d5d 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -102,7 +102,6 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif #include "zend_globals.h" -#include "php_globals.h" #include "SAPI.h" #include "php_ticks.h" diff --git a/ext/standard/ftp_fopen_wrapper.c b/ext/standard/ftp_fopen_wrapper.c index d1bb3aeeccd6..92200e64f238 100644 --- a/ext/standard/ftp_fopen_wrapper.c +++ b/ext/standard/ftp_fopen_wrapper.c @@ -41,7 +41,6 @@ #include "php_standard.h" #include "ext/uri/php_uri.h" -#include #ifdef HAVE_SYS_SOCKET_H #include #endif diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c index da150381f43f..b5c06b84a6aa 100644 --- a/ext/standard/http_fopen_wrapper.c +++ b/ext/standard/http_fopen_wrapper.c @@ -44,7 +44,6 @@ #include "php_standard.h" -#include #ifdef HAVE_SYS_SOCKET_H #include #endif diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c index 63564cc73bdf..f1ab7312c46e 100644 --- a/main/fopen_wrappers.c +++ b/main/fopen_wrappers.c @@ -44,7 +44,6 @@ #include #endif -#include #ifdef HAVE_SYS_SOCKET_H #include #endif diff --git a/main/main.c b/main/main.c index 446ac0fcb797..afb9291586de 100644 --- a/main/main.c +++ b/main/main.c @@ -64,7 +64,6 @@ #include "win32/php_registry.h" #include "ext/standard/flock_compat.h" #endif -#include "php_syslog.h" #include "Zend/zend_exceptions.h" #if PHP_SIGCHILD @@ -75,7 +74,6 @@ #include "zend_compile.h" #include "zend_execute.h" #include "zend_highlight.h" -#include "zend_extensions.h" #include "zend_ini.h" #include "zend_dtrace.h" #include "zend_observer.h" diff --git a/sapi/apache2handler/apache_config.c b/sapi/apache2handler/apache_config.c index e051964a8159..a31ba68f9281 100644 --- a/sapi/apache2handler/apache_config.c +++ b/sapi/apache2handler/apache_config.c @@ -37,7 +37,6 @@ #include "http_log.h" #include "http_main.h" #include "util_script.h" -#include "http_core.h" #ifdef PHP_AP_DEBUG #define phpapdebug(a) fprintf a diff --git a/sapi/apache2handler/php_functions.c b/sapi/apache2handler/php_functions.c index 84437f12ebe9..9b073207c819 100644 --- a/sapi/apache2handler/php_functions.c +++ b/sapi/apache2handler/php_functions.c @@ -41,7 +41,6 @@ #include "http_log.h" #include "http_main.h" #include "util_script.h" -#include "http_core.h" #include "ap_mpm.h" #ifndef PHP_WIN32 #include "unixd.h" diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c index 88fc584a8bcb..2387d24741a4 100644 --- a/sapi/apache2handler/sapi_apache2.c +++ b/sapi/apache2handler/sapi_apache2.c @@ -46,7 +46,6 @@ #include "http_log.h" #include "http_main.h" #include "util_script.h" -#include "http_core.h" #include "ap_mpm.h" #include "php_apache.h" diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index 6db96a43ac97..3decc673389b 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -59,7 +59,6 @@ #include "zend.h" #include "zend_extensions.h" #include "php_ini.h" -#include "php_globals.h" #include "php_main.h" #include "fopen_wrappers.h" #include "http_status_codes.h" diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index 460acb62664a..d1781eab671c 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -31,7 +31,6 @@ #include "SAPI.h" #include -#include "php.h" #ifdef PHP_WIN32 #include "win32/time.h" #include "win32/signal.h" @@ -51,7 +50,6 @@ #include "zend.h" #include "zend_extensions.h" #include "php_ini.h" -#include "php_globals.h" #include "php_main.h" #include "fopen_wrappers.h" #include "ext/standard/php_standard.h" diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c index 046e2174dc1d..bab7ad011e07 100644 --- a/sapi/cli/php_cli_server.c +++ b/sapi/cli/php_cli_server.c @@ -44,7 +44,6 @@ #include #endif -#include #include #ifdef HAVE_DLFCN_H diff --git a/sapi/fpm/fpm/fpm_conf.c b/sapi/fpm/fpm/fpm_conf.c index 63f911af490c..3979d875a18e 100644 --- a/sapi/fpm/fpm/fpm_conf.c +++ b/sapi/fpm/fpm/fpm_conf.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c index cc89b8c07c15..f1f7de70b279 100644 --- a/sapi/fpm/fpm/fpm_main.c +++ b/sapi/fpm/fpm/fpm_main.c @@ -24,7 +24,6 @@ #include "php_variables.h" #include "php_ini_builder.h" #include "zend_modules.h" -#include "php.h" #include "zend_ini_scanner.h" #include "zend_globals.h" #include "zend_stream.h" @@ -32,7 +31,6 @@ #include "SAPI.h" #include -#include "php.h" #ifdef HAVE_SYS_TIME_H # include @@ -61,7 +59,6 @@ #include "zend.h" #include "zend_extensions.h" #include "php_ini.h" -#include "php_globals.h" #include "php_main.h" #include "fopen_wrappers.h" #include "ext/standard/php_standard.h" diff --git a/sapi/litespeed/lscriu.c b/sapi/litespeed/lscriu.c index 042f5fb7a2b5..9d4096ec1c31 100644 --- a/sapi/litespeed/lscriu.c +++ b/sapi/litespeed/lscriu.c @@ -73,7 +73,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include -#include #include #include #include diff --git a/sapi/phpdbg/phpdbg_parser.y b/sapi/phpdbg/phpdbg_parser.y index 50cb93f05f6f..eb711632eb59 100644 --- a/sapi/phpdbg/phpdbg_parser.y +++ b/sapi/phpdbg/phpdbg_parser.y @@ -16,7 +16,6 @@ typedef void* yyscan_t; #include "phpdbg_cmd.h" #include "phpdbg_utils.h" -#include "phpdbg_cmd.h" #include "phpdbg_prompt.h" #include "phpdbg_parser.h"