extension_loaded

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Find out whether an extension is loaded
extension_loaded(string $extension): bool
        try {

            
$process->run(fn ($type$line) => $this->output->write($line));

        } catch (
ProcessSignaledException $e) {

            if (
extension_loaded('pcntl') && $e->getSignal() !== SIGINT) {

                throw 
$e;

            }

        }
    public function setUpRedis()

    {

        if (! 
extension_loaded('redis')) {

            
$this->markTestSkipped('The redis extension is not installed. Please install the extension to enable '.__CLASS__);

        }
    protected function supportsAsyncSignals()

    {

        return 
extension_loaded('pcntl');

    }
    {

        
$this->events->dispatch(new WorkerStopping($status));



        if (
extension_loaded('posix')) {

            
posix_kill(getmypid(), SIGKILL);

        }
        return tap(new Redis, function ($client) use ($config) {

            if (
$client instanceof RedisFacade) {

                throw new 
LogicException(

                    
extension_loaded('redis')

                        ? 
'Please remove or rename the Redis facade alias in your "app" configuration file in order to avoid collision with the PHP Redis extension.'

                        
'Please make sure the PHP Redis extension is installed and enabled.'

                
);