For install PHP, Simple you need to install Apache, MySQL and PHP Server. You can find Many Software for them. For each platform there are different softwares so we listed them in following table.
Windows – Xampp, WAMP
Linux – LAMP
Mac – MAMP
After activate PHP Server you need to create “.php” file and just place in your web directory. You do not need to compile anything or install any extra tools..