PEAR_Dependency2::validateExtensionDependency() – validate a dependency on a PHP extension


require_once '/Dependency2.php';

true|PEAR_Error|array PEAR_Dependency2::validateExtensionDependency ( array $dep , bool $required = true )


This validates against actual in-memory extensions, and will not attempt to locate extensions on disk. To do this, a dependency should be a package dependency with the <providesextension> tag.

As with all dependency validation, true is returned on success, PEAR_Error on failure for required dependencies. If the soft, force or ignore-errors options are specified, an array containing the error message will be returned instead.


array $dep

dependency contents as parsed from xml

boolean $required

Whether this is a required or optional dependency


throws no exceptions thrown


This function can not be called statically.

validate a package.xml 1.0 dependency (Previous) Specify a dependency on an OS. Use arch for detailed os/processor information (Next)
Last updated: Sat, 10 Oct 2015 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report or add a note.
View this page in:

User Notes:

There are no user contributed notes for this page.