I don’t have a solution, but wanted to comment this is a reason to use docker. Instead of tinkering with your host system in ways you’ll probably forget, declare all the steps in a nice containerized system that does one thing: hosts a php website as you develop.
Expose your project through a volume for a mostly seamless file sharing experience between the host and container.
Help installing PHP on Ubuntu (Solved. Thank you!)
(I’m currently using Firefox 124.01 on Ubuntu 22.04.03 LTS) (My formatting is also givinge problems… I want to eat my own eyeballs out right now…)...