Skip to main content

execution_context

Function execution_context 

Source
pub fn execution_context() -> usize
Expand description

Identifies the execution context PHP is running in now: the main context or one fiber (the address of its zend_fiber_context, EG(current_fiber_context)), 0 when PHP is not running. Within one context calls nest strictly, also while other contexts are suspended mid-call, so per-context bookkeeping that is saved and restored around a call stays correct when a fiber suspends inside it. An address can be reused by a later fiber once its context is destroyed.