PEAR Manual
Prev |  | Next

# PEAR::loadExtension()

PEAR::loadExtension() -- OS independant PHP extension load

## Synopsis

    require_once 'PEAR.php';

``boolean PEAR::loadExtension` (string $ext)`

## Description

Loads an extension by name

## Parameter

string `$ext`

  The case-sensitive name of the PHP extension without filename suffix or `php_` prefix.

## Return value

`boolean` - returns `TRUE`, if extension could be loaded

## Note

This function can be called statically.

## Example

Example 26-1. Loading the domxml-extension
    if(!PEAR::loadExtension("domxml")) {
     echo 'Could not load DomXML-Extension!';
     exit();
    }

Prev | Home | Next
PEAR::popExpect() | Up | PEAR_Error