If PHP really is so shitty, can you please in any other language or framework of your choice finish the following project in 10 minutes,
Be able to put a <yoursolution>.<YourLanguageFile> inside any folder where your apache/nginx serves fiels from, then make your file give a much nicer file listing than the default of nginx/apache with possibility to comment on the file (using a __comments/directory and text file for each comment and sequence number as filename). Come back when you have to struggle with various "deployment" options in django/flask and .war files.
Having Apache automagically serve a WSGI app object found in foo.py when you dump it in /opt/magicpath has nothing to do with the language and everything to do with Apache.
Be able to put a <yoursolution>.<YourLanguageFile> inside any folder where your apache/nginx serves fiels from, then make your file give a much nicer file listing than the default of nginx/apache with possibility to comment on the file (using a __comments/directory and text file for each comment and sequence number as filename). Come back when you have to struggle with various "deployment" options in django/flask and .war files.