PEAR::loadExtension()

PEAR::loadExtension() – OS independent 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

Loading the domxml-extension

<?php
if(!PEAR::loadExtension("domxml")) {
 echo 
'Could not load DomXML-Extension!';
 exit();
}
?>
removes the last error code for non-disabling temporary error handling (Previous) PEAR_Exception - PHP 5 and versions above (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.