Yes, PHP is dying mostly because of the way many so-called PHP-programmers write code; even if you give them the best “framework” in the world they will “embed” hundreds if not thousands of lines of PHP code inside the “view” scripts!

Every line of PHP code you write should be easy to understand and maintain. I think, it is valid for many programming languages, but some are not like that by design.

If the compiler writers start treating the programmers like Microsoft did (They think most users are stupid! And they used to think fair percentage of programmers are also stupid!), then we have a problem! We already have a problem actually!! There are now millions of PHP applications out there waiting to be “maintained” – Eugh!

if ($varA
    && ($varB 
        || $varC 
        || $userIsARoleAA
        || $userIsARoleBB)
    && $statusIsX)
{
    !$varC ? $actions[] = 'edit' : null;
}

if ($varA
    && ($varB 
        || $varC 
        || $userIsARoleAA
        || $userIsARoleCC)
    && $statusIsY)
{
    !in_array('view', $actions) ? $actions[] = 'view' : null;
}

When you see many blocks of code like these in a view script, you ask “Why, why, why?!”

Just an indication of sickness:
https://github.com/languages