How to see the extensions loaded by PHP ?

To see all the extensions loaded by PHP, firstly we must be sure that PHP is successfully installed in our system. After that, we can use any of the following approaches to see the loaded extension list.

Approach 1: In this approach, we will use command line to check all the loaded PHP extensions.
Open Terminal or Command Line Interface and type the following command and hit enter.

php -m

It will display the list of all the loaded PHP extensions.



PHP_Ext_A1_output

Approach 2: This approach uses get_loaded_extensions() function to display the list of all the loaded PHP extensions.

Example:

filter_none

edit
close

play_arrow

link
brightness_4
code

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

chevron_right


Output:
PHP_EXT_AP2

Note: Please note that the list of the extension might vary from system to system.



My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.