Depends imo. For things like scraping, data manipulation, deep learning etc.. python is better. For web development, php is better (simply because wordpress and drupal.. you pay less for hiring a dev.. otherwise.. both are same).
Security wise, python is better because it is less popular as a website script choice (again, because of wp and drupal). So, there's less chance of getting hacked because you left some footprint and didn't patch the vuln.
As for a career choice.. it is tough to say. I earn much more money with JavaScript than what I used to with php. I don't work as a python dev (atleast as the primary responsibility.. testing is a different thing) , so I can't speculate..