Type Alias ext_php_rs::zend::ExecutorGlobals

source ·
pub type ExecutorGlobals = _zend_executor_globals;
Expand description

Stores global variables used in the PHP executor.

Aliased Type§

struct ExecutorGlobals {
Show 81 fields pub uninitialized_zval: _zval_struct, pub error_zval: _zval_struct, pub symtable_cache: [*mut _zend_array; 32], pub symtable_cache_limit: *mut *mut _zend_array, pub symtable_cache_ptr: *mut *mut _zend_array, pub symbol_table: _zend_array, pub included_files: _zend_array, pub bailout: *mut [__jmp_buf_tag; 1], pub error_reporting: i32, pub exit_status: i32, pub function_table: *mut _zend_array, pub class_table: *mut _zend_array, pub zend_constants: *mut _zend_array, pub vm_stack_top: *mut _zval_struct, pub vm_stack_end: *mut _zval_struct, pub vm_stack: *mut _zend_vm_stack, pub vm_stack_page_size: usize, pub current_execute_data: *mut _zend_execute_data, pub fake_scope: *mut _zend_class_entry, pub jit_trace_num: u32, pub ticks_count: i32, pub precision: i64, pub persistent_constants_count: u32, pub persistent_functions_count: u32, pub persistent_classes_count: u32, pub no_extensions: bool, pub full_tables_cleanup: bool, pub vm_interrupt: zend_atomic_bool_s, pub timed_out: zend_atomic_bool_s, pub in_autoload: *mut _zend_array, pub hard_timeout: i64, pub stack_base: *mut c_void, pub stack_limit: *mut c_void, pub regular_list: _zend_array, pub persistent_list: _zend_array, pub user_error_handler_error_reporting: i32, pub exception_ignore_args: bool, pub user_error_handler: _zval_struct, pub user_exception_handler: _zval_struct, pub user_error_handlers_error_reporting: _zend_stack, pub user_error_handlers: _zend_stack, pub user_exception_handlers: _zend_stack, pub exception_class: *mut _zend_class_entry, pub error_handling: u32, pub capture_warnings_during_sccp: i32, pub timeout_seconds: i64, pub ini_directives: *mut _zend_array, pub modified_ini_directives: *mut _zend_array, pub error_reporting_ini_entry: *mut _zend_ini_entry, pub objects_store: _zend_objects_store, pub exception: *mut _zend_object, pub prev_exception: *mut _zend_object, pub opline_before_exception: *const _zend_op, pub exception_op: [_zend_op; 3], pub current_module: *mut _zend_module_entry, pub active: bool, pub flags: u8, pub assertions: i64, pub ht_iterators_count: u32, pub ht_iterators_used: u32, pub ht_iterators: *mut _HashTableIterator, pub ht_iterators_slots: [_HashTableIterator; 16], pub saved_fpu_cw_ptr: *mut c_void, pub trampoline: _zend_function, pub call_trampoline_op: _zend_op, pub weakrefs: _zend_array, pub exception_string_param_max_len: i64, pub get_gc_buffer: zend_get_gc_buffer, pub main_fiber_context: *mut _zend_fiber_context, pub current_fiber_context: *mut _zend_fiber_context, pub active_fiber: *mut _zend_fiber, pub fiber_stack_size: usize, pub record_errors: bool, pub num_errors: u32, pub errors: *mut *mut _zend_error_info, pub filename_override: *mut _zend_string, pub lineno_override: i64, pub call_stack: _zend_call_stack, pub max_allowed_stack_size: i64, pub reserved_stack_size: u64, pub reserved: [*mut c_void; 6],
}

Fields§

§uninitialized_zval: _zval_struct§error_zval: _zval_struct§symtable_cache: [*mut _zend_array; 32]§symtable_cache_limit: *mut *mut _zend_array§symtable_cache_ptr: *mut *mut _zend_array§symbol_table: _zend_array§included_files: _zend_array§bailout: *mut [__jmp_buf_tag; 1]§error_reporting: i32§exit_status: i32§function_table: *mut _zend_array§class_table: *mut _zend_array§zend_constants: *mut _zend_array§vm_stack_top: *mut _zval_struct§vm_stack_end: *mut _zval_struct§vm_stack: *mut _zend_vm_stack§vm_stack_page_size: usize§current_execute_data: *mut _zend_execute_data§fake_scope: *mut _zend_class_entry§jit_trace_num: u32§ticks_count: i32§precision: i64§persistent_constants_count: u32§persistent_functions_count: u32§persistent_classes_count: u32§no_extensions: bool§full_tables_cleanup: bool§vm_interrupt: zend_atomic_bool_s§timed_out: zend_atomic_bool_s§in_autoload: *mut _zend_array§hard_timeout: i64§stack_base: *mut c_void§stack_limit: *mut c_void§regular_list: _zend_array§persistent_list: _zend_array§user_error_handler_error_reporting: i32§exception_ignore_args: bool§user_error_handler: _zval_struct§user_exception_handler: _zval_struct§user_error_handlers_error_reporting: _zend_stack§user_error_handlers: _zend_stack§user_exception_handlers: _zend_stack§exception_class: *mut _zend_class_entry§error_handling: u32§capture_warnings_during_sccp: i32§timeout_seconds: i64§ini_directives: *mut _zend_array§modified_ini_directives: *mut _zend_array§error_reporting_ini_entry: *mut _zend_ini_entry§objects_store: _zend_objects_store§exception: *mut _zend_object§prev_exception: *mut _zend_object§opline_before_exception: *const _zend_op§exception_op: [_zend_op; 3]§current_module: *mut _zend_module_entry§active: bool§flags: u8§assertions: i64§ht_iterators_count: u32§ht_iterators_used: u32§ht_iterators: *mut _HashTableIterator§ht_iterators_slots: [_HashTableIterator; 16]§saved_fpu_cw_ptr: *mut c_void§trampoline: _zend_function§call_trampoline_op: _zend_op§weakrefs: _zend_array§exception_string_param_max_len: i64§get_gc_buffer: zend_get_gc_buffer§main_fiber_context: *mut _zend_fiber_context§current_fiber_context: *mut _zend_fiber_context§active_fiber: *mut _zend_fiber§fiber_stack_size: usize§record_errors: bool§num_errors: u32§errors: *mut *mut _zend_error_info§filename_override: *mut _zend_string§lineno_override: i64§call_stack: _zend_call_stack§max_allowed_stack_size: i64§reserved_stack_size: u64§reserved: [*mut c_void; 6]

Implementations§

source§

impl ExecutorGlobals

source

pub fn get() -> GlobalReadGuard<Self>

Returns a reference to the PHP executor globals.

The executor globals are guarded by a RwLock. There can be multiple immutable references at one time but only ever one mutable reference. Attempting to retrieve the globals while already holding the global guard will lead to a deadlock. Dropping the globals guard will release the lock.

source

pub fn get_mut() -> GlobalWriteGuard<Self>

Returns a mutable reference to the PHP executor globals.

The executor globals are guarded by a RwLock. There can be multiple immutable references at one time but only ever one mutable reference. Attempting to retrieve the globals while already holding the global guard will lead to a deadlock. Dropping the globals guard will release the lock.

source

pub fn class_table(&self) -> Option<&ZendHashTable>

Attempts to retrieve the global class hash table.

source

pub fn function_table(&self) -> Option<&ZendHashTable>

Attempts to retrieve the global functions hash table.

source

pub fn function_table_mut(&self) -> Option<&mut ZendHashTable>

Attempts to retrieve the global functions hash table as mutable.

source

pub fn ini_values(&self) -> HashMap<String, Option<String>>

Retrieves the ini values for all ini directives in the current executor context..

source

pub fn constants(&self) -> Option<&ZendHashTable>

Attempts to retrieve the global constants table.

source

pub fn take_exception() -> Option<ZBox<ZendObject>>

Attempts to extract the last PHP exception captured by the interpreter. Returned inside a ZBox.

This function requires the executor globals to be mutably held, which could lead to a deadlock if the globals are already borrowed immutably or mutably.

source

pub fn has_exception() -> bool

Checks if the executor globals contain an exception.

source

pub fn throw_if_exception() -> PhpResult<()>

Attempts to extract the last PHP exception captured by the interpreter. Returned inside a PhpResult.

This function requires the executor globals to be mutably held, which could lead to a deadlock if the globals are already borrowed immutably or mutably.

source

pub fn request_interrupt(&mut self)

Request an interrupt of the PHP VM. This will call the registered interrupt handler function. set with crate::ffi::zend_interrupt_function.

source

pub fn cancel_interrupt(&mut self)

Cancel a requested an interrupt of the PHP VM.