static void executor_globals_ctor(zend_executor_globals *executor_globals) /* {{{ */
{
ZEND_TSRMLS_CACHE_UPDATE;
+ memset(executor_globals, 0, sizeof(*executor_globals));
+
zend_startup_constants();
zend_copy_constants(EG(zend_constants), GLOBAL_CONSTANTS_TABLE);
zend_init_rsrc_plist();
zend_init_exception_op();
- EG(lambda_count) = 0;
- ZVAL_UNDEF(&EG(user_error_handler));
- ZVAL_UNDEF(&EG(user_exception_handler));
- EG(in_autoload) = NULL;
- EG(current_execute_data) = NULL;
- EG(current_module) = NULL;
- EG(exit_status) = 0;
-#if XPFPA_HAVE_CW
- EG(saved_fpu_cw) = 0;
-#endif
- EG(saved_fpu_cw_ptr) = NULL;
- EG(active) = 0;
+ EG(error_reporting) = E_ALL & ~E_NOTICE;
}
/* }}} */
ini_scanner_globals_ctor(&ini_scanner_globals);
php_scanner_globals_ctor(&language_scanner_globals);
zend_set_default_compile_time_values();
- ZVAL_UNDEF(&EG(user_error_handler));
- ZVAL_UNDEF(&EG(user_exception_handler));
+ EG(error_reporting) = E_ALL & ~E_NOTICE;
#endif
zend_interned_strings_init();
static void core_globals_ctor(php_core_globals *core_globals)
{
memset(core_globals, 0, sizeof(*core_globals));
-
- php_startup_ticks();
}
/* }}} */
#endif
char *php_os;
zend_module_entry *module;
#ifdef ZTS
- zend_executor_globals *executor_globals;
void ***tsrm_ls;
- php_core_globals *core_globals;
#endif
#if defined(PHP_WIN32) || (defined(NETWARE) && defined(USE_WINSOCK))
_CrtSetReportMode(_CRT_ASSERT, 0);
#endif
#else
- php_os=PHP_OS;
+ php_os = PHP_OS;
#endif
#ifdef ZTS
php_output_startup();
- zuf.error_function = php_error_cb;
- zuf.printf_function = php_printf;
- zuf.write_function = php_output_wrapper;
- zuf.fopen_function = php_fopen_wrapper_for_zend;
- zuf.message_handler = php_message_handler_for_zend;
- zuf.block_interruptions = sapi_module.block_interruptions;
- zuf.unblock_interruptions = sapi_module.unblock_interruptions;
- zuf.get_configuration_directive = php_get_configuration_directive_for_zend;
- zuf.ticks_function = php_run_ticks;
- zuf.on_timeout = php_on_timeout;
- zuf.stream_open_function = php_stream_open_for_zend;
- zuf.vspprintf_function = vspprintf;
- zuf.vstrpprintf_function = vstrpprintf;
- zuf.getenv_function = sapi_getenv;
- zuf.resolve_path_function = php_resolve_path_for_zend;
- zend_startup(&zuf, NULL);
-
#ifdef ZTS
- executor_globals = ts_resource(executor_globals_id);
ts_allocate_id(&core_globals_id, sizeof(php_core_globals), (ts_allocate_ctor) core_globals_ctor, (ts_allocate_dtor) core_globals_dtor);
- core_globals = ts_resource(core_globals_id);
+ php_startup_ticks();
#ifdef PHP_WIN32
ts_allocate_id(&php_win32_core_globals_id, sizeof(php_win32_core_globals), (ts_allocate_ctor) php_win32_core_globals_ctor, (ts_allocate_dtor) php_win32_core_globals_dtor);
#endif
}
}
#endif
- EG(bailout) = NULL;
- EG(error_reporting) = E_ALL & ~E_NOTICE;
- PG(header_is_being_sent) = 0;
- SG(request_info).headers_only = 0;
- SG(request_info).argv0 = NULL;
- SG(request_info).argc=0;
- SG(request_info).argv=(char **)NULL;
- PG(connection_status) = PHP_CONNECTION_NORMAL;
- PG(during_request_startup) = 0;
- PG(last_error_message) = NULL;
- PG(last_error_file) = NULL;
- PG(last_error_lineno) = 0;
- EG(error_handling) = EH_NORMAL;
- EG(exception_class) = NULL;
- PG(disable_functions) = NULL;
- PG(disable_classes) = NULL;
- EG(exception) = NULL;
- EG(objects_store).object_buckets = NULL;
+
+ zuf.error_function = php_error_cb;
+ zuf.printf_function = php_printf;
+ zuf.write_function = php_output_wrapper;
+ zuf.fopen_function = php_fopen_wrapper_for_zend;
+ zuf.message_handler = php_message_handler_for_zend;
+ zuf.block_interruptions = sapi_module.block_interruptions;
+ zuf.unblock_interruptions = sapi_module.unblock_interruptions;
+ zuf.get_configuration_directive = php_get_configuration_directive_for_zend;
+ zuf.ticks_function = php_run_ticks;
+ zuf.on_timeout = php_on_timeout;
+ zuf.stream_open_function = php_stream_open_for_zend;
+ zuf.vspprintf_function = vspprintf;
+ zuf.vstrpprintf_function = vstrpprintf;
+ zuf.getenv_function = sapi_getenv;
+ zuf.resolve_path_function = php_resolve_path_for_zend;
+ zend_startup(&zuf, NULL);
#if HAVE_SETLOCALE
setlocale(LC_CTYPE, "");