The php Function Get_Loaded_Extensions
The php function get_loaded_extensions returns an array of all extensions that are loaded on your server. It is a useful function for developers who need to know if they can use an extension. This article will walk you through how to use this function to see your available extensions.
Many functions in PHP require specific extensions to be compiled in, otherwise you’ll receive an “undefined function” error when trying to use them. This is why it’s important to keep your PHP version up to date. However, sometimes it can be difficult to determine the version that your web hosting provider or server is running.
PHP comes standard with many functions, but there are also numerous extensions that you can enlist to do advanced things. Some of these are required to run at all, while others may cause fatal errors if they are not compiled in. Luckily, there are two easy ways to check which extensions are loaded into your PHP: phpinfo() and get_loaded_extensions().
Both of these functions are able to provide information about which extensions are loaded into your PHP, including their names and versions. You can also find some other helpful information, such as whether the extension is enabled or not and its file path.
If you want to know more about PHP, consider picking up the book Hacking with PHP. You’ll learn about everything from getting started with PHP to creating complex web applications. This is a great resource for anyone who wants to take their PHP skills to the next level!