Back in 2008, I chose PHP for my first forays into web programming because of how easy it was to setup and use compared to other solutions I was aware of. The last time I touched it was back in 2011. Python has pretty much completely replaced PHP for me. Get a good basic web framework like CherryPy or Bottle and couple it with a templating engine like Jinja2 or Mako and you can do anything you could do in PHP, but in a better ecosystem.