Can I run PHP locally on my PC?
Hi James and welcome to the forum.
As far as running PHP locally on your PC is concerned the answer is maybe
If you are running an Apple Mac, Windows or Linux then search for WAMP or XAMPP both are free and not only allow PHP but also MySQL databases.
Why would you like to run PHP on your computer?
Vagrant is the way to go.
Once you follow those install instructions the below is a sitepoint article discussing using puphpet to create vagrant config files to easily setup a lamp environment on the vm using vagrant.
I've used XAMPP for the past several years to set up sandbox environments, since it's basically a one-click install to get up and running. However, Vagrant does look interesting.
On a Windows machine, I highly suggest XAMPP over other options like WAMP or self install.
The problem with using XAMPP is that that more often than not projects require other languages such as; ruby or node js. In some cases you are also left with UNIX scripts that no one has created a windows counterpart for either. Setting up everything is much easier in a *NIX environment where is it relatively painless to install just about anything regardless of how large a project becomes or dependencies are added. Vagrant is well worth the time to learn. I've been stuck on XAMPP using windows for just about all my career and it finally nice to have a local environment where installing anything is easy. Not to mention having an option to closely replicate a production server locally. Also leveraging puppet to easily install specific versions of software considering that can be tricky using apt-get or the other *NIX equivalents. I would go as far to say Vagrant + Virtual Box + Puppet + PupHpet is the best *new technology stack for local environments. I will never be installing XAMPP again.
If you're new to programming and everything around computers, then you could try with WAMP like other suggested (if you are on Windows). If you're familiar with Linux, you should check out vagrant / virtual box / puphpet.
Im currently using WAMP on a windows 7 based computer. Easy to install and get running.