extension_loaded

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

        
$location $timeZone->getLocation();

        
$formatted = (new \DateTime('now'$timeZone))->format($location 'e (P)' 'P');

        
$title $location && \extension_loaded('intl') ? \Locale::getDisplayRegion('-'.$location['country_code']) : '';



        
$z = [Caster::PREFIX_VIRTUAL.'timezone' => new ConstStub($formatted$title)];
    public function provideTimeZones()

    {

        
$xRegion \extension_loaded('intl') ? '%s' '';



        return [
    public function testGenerator()

    {

        if (
\extension_loaded('xdebug')) {

            
$this->markTestSkipped('xdebug is active');

        }