How can one verify if the gd library is correctly installed in PHP, especially if it does not appear in the phpinfo() output?

If the gd library does not appear in the phpinfo() output, it may be due to the library not being properly installed or enabled in the PHP configuration. To verify if the gd library is correctly installed, you can create a simple PHP script that checks for the existence of the gd functions. If the functions are available, then the gd library is likely installed correctly.

<?php
if (function_exists('gd_info')) {
    echo "GD library is installed and enabled.";
} else {
    echo "GD library is not installed or enabled.";
}
?>