When PHP is no longer the best solution for the problem.
Most apps can be built in most languages, from PHP to JS to Ruby. It comes down to:
When it came time to build an API, I chose JS over PHP because of how easy it was to get Node/Express up and running vs an opinionated framework like a Slim.
And when I need to prototype a concept quickly, I often pick PHP, as I can control the server and front end more easily than say JS.
It's all your personal preference mixed with circumstances of the project. There's no need to abandon PHP if you enjoy using it, there's plenty of developers using PHP7, Composer, and all that jazz. And it's always cool to challenge yourself too and break out of any mold you've grown into.