I think it's easy to say it's declining based on things like Red Monk's ranking, but with GitHub, Stripe and Shopify behind it, it's not going anywhere soon.
And apparently Rails us is slowly increasing: https://arstechnica.com/gadgets/2021/09/php-maintains-an-eno...