That's probably because C/++ don't have good drop in alternatives. If I want to write a website, there are at least half a dozen equally mature languages to choose from. If I want to write any kind of embedded systems code, C is almost always going to be far and away the easiest way to go.
Not as much, but an awful lot, and in similar ways.
There's a difference in that PHP originated as a low-quality templating language, and that C/C++ are historical monuments of computing that most of the infrastructure of the world and most of the interpreted languages of the world run on.
There's not much of a difference in people calling both old, only used by dinosaurs, essentially unsafe, and the root cause of all bugs being choosing to use them in the first place.
The dangerous features of C/C++ gives you something useful in return -- low level control of memory. The dangerous features of PHP don't provide any benefits. It's dangerous because of poor design.