Home > PHP > Function > PHP Options/Info > extension_loaded()

extension_loaded()

extension_loaded - Find out whether an extension is loaded

Syntax

bool extension_loaded (string $name)

Arguments

  • name - The extension name. You can see the names of various extensions by using phpinfo() or if you\'re using the CGIor CLIversion of PHP you can use the -mswitch to list all available extensions: $ php -m[PHP Modules]xmltokenizerstandardsocketssessionposixpcreoverloadmysqlmbstringctype[Zend Modules]

Description

Finds out whether the extension is loaded.

Version

PHP 4, 5

Return value

Returns TRUE if the extension identified by name is loaded, FALSE otherwise.