Does it matter whether the application being tested (automated using Selenium webdriver) is written in PHP or Java? Does the way automation scripts are written change with the webapp's language?
As far as I know it does not.
But the underlying may impact the automation. For example if you use third part control on your application then you may or may not be able to automate it.