if (Context::isInstalled('gd')) { // GD library is installed } else { // GD library is not installed }
if (Context::isInstalled('pdo')) { // PDO extension is installed } else { // PDO extension is not installed }
if (Context::isInstalled('curl')) { // curl extension is installed } else { // curl extension is not installed }This code checks if the `curl` extension is installed on the server. If it is, the code executes the first condition, otherwise, it executes the second condition. In all of these examples, `Context::isInstalled()` is used to check for the installation of specific modules or extensions. Depending on the package library being used, different module and extension names may need to be passed in to check for their presence.