src/Util/FunctionAvailabilityCheck.php
public static function isFunctionEnabled($function, $extension = null)
    {
        return
            (null === $extension || extension_loaded($extension))
            && !static::isFunctionBlacklistedInPhpIni($function)
            && !static::isFunctionBlacklistedInSuhosin($function)
            && static::isFunctionDefined($function);
    }
public static function isFunctionEnabled($function, $extension = null)
    {
        return
            (null === $extension || extension_loaded($extension))
            && !static::isFunctionBlacklistedInPhpIni($function)
            && !static::isFunctionBlacklistedInSuhosin($function)
            && static::isFunctionDefined($function);
    }
public static function isFunctionEnabled ( $ function , $ extension = null ) { return ( null === $ extension || extension_loaded ( $ extension ) ) && ! static :: isFunctionBlacklistedInPhpIni ( $ function ) && ! static :: isFunctionBlacklistedInSuhosin ( $ function ) && static :: isFunctionDefined ( $ function ) ; }
Check if function is defined.

@param string      $function  The function to test.

@param string|null $extension The optional name of an php extension providing said function.

@return bool
Check if function is defined .