PHP and Python require interpreters to be running on the server. This isn’t going to function over IPFS, since there’s no method to run an executable program within IPFS.
However, you can use an MFS hierarchy along with CSS to create static web pages and web sites with very professional presentation. In order for such web sites and pages to be displayed correctly, the site or page needs to be accessed via the root directory’s hash.
/(root) -> index.html -> /css/page.css
Something like this should work if MFS is used and the Qm hash of the root directory is the entry point.
Of course, this is all static content. Dynamic content might be workable using some sort of external JS code sitting on a link in one of the static web pages and overlaying the dynamic elements. However, retrieving user input and doing something with it in PHP or Python isn’t going to function from within IPFS.