Oihana PHP

isExtensionLoaded.php

Table of Contents

Functions

isExtensionLoaded()  : bool
Checks if a PHP extension is loaded.

Functions

isExtensionLoaded()

Checks if a PHP extension is loaded.

isExtensionLoaded(string $ext) : bool
Parameters
$ext : string

The case-insensitive name of the extension (e.g. 'intl', 'bcmath').

Tags
example
use function oihana\core\env\isExtensionLoaded;

if ( isExtensionLoaded( 'intl' ) )
{
    // safe to use grapheme_* / Normalizer
}
author

Marc Alcaraz

since
1.0.0
Return values
bool

true if a PHP extension is loaded, false otherwise

On this page

Search results