Docker is a pretty handy containerisation program.
I've been playing around with a Docker image for the purposes of getting PHP, MySQL, Apache, XDebug to play nicely with VS Code on Mac (although should work on any OS). The Docker image I forked from has phpMyAdmin too, I've tried installing phpBB on here as well and it's great.
I haven't seen
XDebug mentioned in the topic yet, but it's an incredible tool (works with VS Code or PHPStorm) which lets you use breakpoints in code so that when you load a PHP page in the browser, it automatically highlights the line of code that is being executed along with the ability to inspect values of variables.
(I've put my Docker setup and documentation on GitHub at
https://github.com/battye/battye-docker-lamp if anyone is interested in Docker and looking for a starting point - big thanks to Marc for helping me out with some Docker questions as I'm forcing myself to learn Docker after using Vagrant for a few years
)