Extensions or often also called PHP modules are program code in the form of subroutines that will be grafted into the body of PHP. Functions that we often use in PHP, for example fopen(), base64_encode(), or mysql_query() and so on are actually PHP extensions. . We can see the insides of each extension in the ext/ subdirectory of the PHP program code directory.
PHP consists of core applications (PHP core), and additional functions (extensions). In the core PHP applications, PHP does not provide functions that handle MySQL databases. The handling for this database function is separated into additional functions (extension). Apart from database, PHP's extension provides various other functions for more specialized purposes, such as image generation, cryptography, email handling, PDF creation, and others.</p >