You forgot one thing: PHP has a far larger community and packages compared to exotic languages like Elixir.
Everything is documented and there are tons of resources out there to solve a problem.
It's like C++ for the web. Why does C++ still live? Community, extensively tested and adopted by large organizations. Well PHP is the same. Until big companies are out there using PHP (consider Vimeo or Flixbus or Groupon as example), because it is perfomant, it will fail to die.
I agree with you: strong community support is essential in the survival of any language/technology. PHP has a large community and a dizzying number of packages. That helps a lot. But I can think of a number of languages (Python, Perl, Ruby) that also have large communities and vast numbers of libraries at their disposal. Therefore, I don't think you could pick PHP over any of those just because "it has more libraries".
Furthermore, Elixir, while it has fewer libraries and a smaller community, is growing fast. The core language is also exceptionally well documented and discoverable. It has libraries that cover essentially all your common use cases.
I guess what I want to say is, I'm happy PHP is getting better for all the programmers stuck using it. There's no reason to use it for anything new, because there's always a better tool out their for your job.