extension_loaded
Function • Params and return types changed in PHP 8.0
Find out whether an extension is loaded.
extension_loaded Function synopsis
extension_loaded(string $extension): bool
Parameters
$extension
Typestring
The extension name. This parameter is case-insensitive.
$extension accepts one of the following string values:
amqpapacheapcapdbbcodebcmathbcompilerbz2cairocalendarchdbclasskitcomcrackctypecubridcurlcyrusdbadbasedbplusdbxdiodomdotneteioenchanteveventexifexpectfamfbsqlfdffileinfofileprofilterfribidiftpgearmangendergeoipgettextgmagickgmpgnupggupnpharuhtscannerpecl_httphyperwavehwapiinterbaseibm_db2iconvid3informixiisfuncgdimagickimapincludeingresinotifyintljavajsonjudykadm5ktagliblapackldaplibeventlibxmllualzfmailparsemaxdbmbstringmcryptmcvememcachememcachedmemtrackmhashmingmnogosearchmongomqseriesmsessionmsqlmssqlmysqlmysqlimysqlndmysqlnd_memcachemysqlnd_msmysqlnd_muxmysqlnd_qcmysqlnd_uhncursesnet_gophernewtnotesnsapioauthoci8oggvorbisopenalopensslovrimosparadoxparsekitpcntlpcrepdflibpdopdo_4dpdo_cubridpdo_dblibpdo_firebirdpdo_ibmpdo_informixpdo_mysqlpdo_ocipdo_odbcpdo_pgsqlpdo_sqlitepdo_sqlsrvpdo_pgsqlpharposixprinterproctitlepspspellpthreadsqtdomquickhashradiusrarreadlinerecoderpmreaderrrdrunkitsamscascreamsca_sdosysvmsgsessionsession_pgsqlshmopsimplexmlsnmpsoapsocketssolrsphinxspl_typesspplussqlitesqlite3sqlsrvssdeepssh2statsstompsvmsvnswfswishsybasetainttcpwraptidytokenizertokyo_tyranttraderodbcv8jsvarnishvpopmailw32apiwddxweakrefwin32pswin32servicewincachexattrxdiffxhprofxmlxmlreaderxmlrpcxmlwriterxslxsltyafyamlyazzipzlib
Return value
Typebool
Returns true if the extension identified by $extension
is loaded, false otherwise.
Changes to the extension_loaded Function
PHP 8.0
- Return type added:
bool - Parameter name of parameter #1 changed:
$extension_nameto$extension - Parameter type added for parameter #1 (
$extension):string
- extension_loaded($extension_name)
+ extension_loaded(string $extension): bool extension_loaded Function Availability
extension_loaded Function Availability| PHP Version | Availability |
|---|---|
| PHP 8.6Upcoming Release | Yes |
| PHP 8.5Supported (Latest) | Yes |
| PHP 8.4Supported | Yes |
| PHP 8.3Security-Fixes Only | Yes |
| PHP 8.2Security-Fixes Only | Yes |
| PHP 8.1Unsupported | Yes |
| PHP 8.0Unsupported | Yes |
| PHP 7.4Unsupported | Yes |
| PHP 7.3Unsupported | Yes |
| PHP 7.2Unsupported | Yes |
| PHP 7.1Unsupported | Yes |
| PHP 7.0Unsupported | Yes |
| PHP 5.6Unsupported | Yes |
| PHP 5.5Unsupported | Yes |
| PHP 5.4Unsupported | Yes |
| PHP 5.3Unsupported | Yes |