The best and easiest 2 ways to install php is using php installer tools on any device such as windows, linux and os x
- for installing php on windows, linux and os x
- for installing php only on windows
Download and install any of the tool
These php installer tools will setup PHP environment and get your local machine ready to use php.
After you install any of them on device it will automatically set all configuration required for running php applications to run.
we prefer xampp to wampserver because it is easier and have well documentation and forum stack for developers.