pub fn get() -> GlobalReadGuard<Self> {
        // SAFETY: PHP executor globals are statically declared therefore should never
        // return an invalid pointer.
        let globals = unsafe { &*ext_php_rs_process_globals() };

        cfg_if::cfg_if! {
            if #[cfg(php_zts)] {
                let guard = lock::PROCESS_GLOBALS_LOCK.with(|l| l.read_arc());
            } else {
                let guard = lock::PROCESS_GLOBALS_LOCK.read_arc();
            }
        }

        GlobalReadGuard { globals, guard }
    }
Returns a reference to the PHP process globals.

The process 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.
src/zend/globals.rs