Running PHP Code
There are lots of ways to run php, but the easiest is via a website hosting account. Make a folder, maybe name it “phpstuff” and then upload your HTML and PHP files into that folder. Then load “https://foo.com/phpstuff/index.php”.
There are ways to install PHP on Mac, Windows, and Linux, but I haven’t found an easier way.
If you have a favorite way post below!
MAMP is not so bad and you can play with Apache or NGINX and run 100% locally
A local VM with Linux, bridge mode, for everything I want to emulate/adjust/test before uploading to a VM on the cloud. A VirtualBox solve it.
Here is a recipe needing some adjustments for someone’s personal use, to install Nginx, Php, PhpMyAdmin, MariaDB, Postgressql and PhpPgAdmin
For windows I allways used XAMPP
I do use a VM with Linux in WINDOWS and/or MAC. Optionally, you can even add docker there for an extra level of abstraction, but most of the time I just use a pure VM.
<plug>
Lifeboat will install PHP on your remote Linux server, it makes setup a one click install 
</plug>
2 Likes