When it’s about Python vs PHP, I certainly feel that Python is used for general purposes as similar to Java. With great choice of libraries Python can be used for developing scientific and AI/ML applications. PHP is open-source, offer exceptionally straight-forward, and case sensitive. For all this, PHP became the favorite most programming languages among web developers.
My bet goes to Python.
I don’t see a lot of students, that want to use language for grannies(PHP).
I’m a PHP Dev but moved into JS. Just because it gives more abilities and evolving more quickly.
Another point - Python is a great language and a lot of universities teaching it to students as the first language.
Next point - a lot of people using Python for Machine Learning purposes. So I think it makes it pretty hot on the current market.