= 8.1, an NTS build, and the FFI extension'); return false; } try { $fibers = FFI::scope('OTEL_ZEND_OBSERVER_FIBER'); } catch (FFI\Exception $e) { try { $fibers = FFI::load(__DIR__ . '/fiber/zend_observer_fiber.h'); } catch (FFI\Exception $e) { trigger_error(sprintf('Context: Fiber context switching not supported, %s', $e->getMessage())); return false; } } $fibers->zend_observer_fiber_init_register(static fn (int $initializing) => Context::storage()->fork($initializing)); //@phpstan-ignore-line $fibers->zend_observer_fiber_switch_register(static fn (int $from, int $to) => Context::storage()->switch($to)); //@phpstan-ignore-line $fibers->zend_observer_fiber_destroy_register(static fn (int $destroying) => Context::storage()->destroy($destroying)); //@phpstan-ignore-line return true; } }