className = $envClassName; } /** * {@inheritdoc} * * The type of worker created depends on the extensions available. If multi-threading is enabled, a WorkerThread * will be created. If threads are not available a WorkerProcess will be created. */ public function create(): Worker { if (Thread::isSupported()) { return new WorkerThread($this->className); } return new WorkerProcess( $this->className, [], \getenv("AMP_PHP_BINARY") ?: (\defined("AMP_PHP_BINARY") ? \AMP_PHP_BINARY : null) ); } }