How to test PHP installation

To test a successful php installation. We can check the PHP version in your machine or test the entire PHP setup using following

open a file in which your web directory name it anything like php_test.php and write the following content.

?php
phpinfo();
?>

Save the file and open the file in your browser like localhost/php_test.php.

Then you will notice that if php is installed the following image will be displayed.

PHP successful installation screenshot

There is a video tutorial that explains the same as above.