PHP 8.3.4 Released!

get_loaded_extensions

(PHP 4, PHP 5, PHP 7, PHP 8)

get_loaded_extensionsReturns an array with the names of all modules compiled and loaded

Descrição

get_loaded_extensions(bool $zend_extensions = false): array

This function returns the names of all the modules compiled and loaded in the PHP interpreter.

Parâmetros

zend_extensions

Only return Zend extensions, if not then regular extensions, like mysqli are listed. Defaults to false (return regular extensions).

Valor Retornado

Returns an indexed array of all the modules names.

Exemplos

Exemplo #1 get_loaded_extensions() Example

<?php
print_r
(get_loaded_extensions());
?>

O exemplo acima produzirá algo semelhante a:

Array
(
    [0] => Core
    [1] => date
    [2] => libxml
    [3] => pcre
    [4] => sqlite3
    [5] => zlib
    [6] => ctype
    [7] => dom
    [8] => fileinfo
    [9] => filter
    [10] => hash
    [11] => json
    [12] => mbstring
    [13] => SPL
    [14] => PDO
    [15] => session
    [16] => posix
    [17] => Reflection
    [18] => standard
    [19] => SimpleXML
    [20] => pdo_sqlite
    [21] => Phar
    [22] => tokenizer
    [23] => xml
    [24] => xmlreader
    [25] => xmlwriter
    [26] => gmp
    [27] => iconv
    [28] => intl
    [29] => bcmath
    [30] => sodium
    [31] => Zend OPcache
)

Veja Também

  • get_extension_funcs() - Retorna um array com os nomes das funções de um módulo
  • extension_loaded() - Descobre se uma extensão está carregada
  • dl() - Carrega uma extensão do PHP durante a execução
  • phpinfo() - Outputs information about PHP's configuration

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top