Check if PHP is working on Apache with this link- https://localhost/phpinfo.php.The output will show you all the details of active PHP and the PHP version. It will show you the values of PHP variables, enabled PHP modules, their version, and other information.