extension_loaded

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Find out whether an extension is loaded
<?php extension_loaded(string $extension): bool
<?php             'prefix_indexes' => true,

            'strict' => true,

            'engine' => null,

            'options' => extension_loaded('pdo_mysql') ? array_filter([

                PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),

            ]) : [],

        ],
<?php             'prefix_indexes' => true,

            'strict' => true,

            'engine' => null,

            'options' => extension_loaded('pdo_mysql') ? array_filter([

                PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),

            ]) : [],

        ],
<?php         Signals::resolveAvailabilityUsing(function () {

            return $this->app->runningInConsole()

                && ! $this->app->runningUnitTests()

                && extension_loaded('pcntl');

        });

    }
<?php     public function setUpRedis()

    {

        if (! extension_loaded('redis')) {

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

        }
<?php     protected function supportsAsyncSignals()

    {

        return extension_loaded('pcntl');

    }
<?php     {

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



        if (extension_loaded('posix')) {

            posix_kill(getmypid(), SIGKILL);

        }
<?php         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.'

                );
<?php     protected static function ensureIntlExtensionIsInstalled()

    {

        if (! extension_loaded('intl')) {

            $method = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2)[1]['function'];



            throw new RuntimeException('The "intl" PHP extension is required to use the ['.$method.'] method.');