if (extension_loaded('pdo_mysql')) { echo 'pdo_mysql extension is loaded'; } else { echo 'pdo_mysql extension is not loaded'; }In the above code example, we are checking if the `pdo_mysql` extension is loaded or not using the `extension_loaded` function. This function is part of PHP’s core library and does not require any external package or library to be installed. Overall, the has_extension method is a very useful tool for PHP developers who want to check if a specific extension is installed on their system before using it in their code.