I could solve these issues with the suggestions you made, but why? I can develop stuff in many languages directly in Windows just fine, and I frankly am not willing to jump through hoops so I can do the same stuff with PHP -- that I can conveniently with Python, JS, dotnet, Java, Elixir, Rust, C/C++ and many other languages. I never found anything so complex and buggy as PHP.
Certainly if you do not like PHP. However, if you wanted to use it there is no real reason not to.
My usage of PHP has been using software written by other people but customising - and there is a lot of useful stiff written in PHP. I prefer Python if doing something from scratch, but I would rather write a small amount of PHP to add a bit of functionality rather than write 10× the amount of Python because I need to write everything from scratch.