Most of the time we use phpinfo() to check all the PHP modules but if you want to check any particular module then you can follow below steps:
You can put a php file like test.php and check desired modules.
<?php
echo "DOM: ", extension_loaded('dom') ? 'OK' : 'MISSING', '<br>';
echo "GD: "...