dl

bool dl(string extension) 

Loads an extension.

Returns:

TRUE on success; FALSE on error

Description:

Attempts to load an extension into PHP. Extensions provide an alternative to compiling directly into PHP, as individual extensions can be loaded via the PHP initialization file or via the dl() function. Note that including the function in every script incurs a performance penalty. You can also use extension_loaded() to check whether the extension is already loaded before using dl(). This function is not supported on some multithreaded web servers, in particular running PHP as an ISAPI extension under Windows IIS.

Example:

Load an extension
 // load the GD module if (extension_loaded("gd")) { echo "Extension found"; } else { echo "Extension ...

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.