It's one of the main reasons that frameworks exist today. 99% of DEVs are not security conscious enough, and would leave gaping holes in their code. No input validation, SQL injections, trusting data posted to code without validation, on and on.
If you were continuously hacked no matter the update, likely the code was the issue not PHP. Or of course, your servers were backdoored at that point.
A framework often protects from much of this.
https://www.cvedetails.com/vulnerability-list/vendor_id-74/P...
https://www.cvedetails.com/vulnerability-list/vendor_id-74/P...
But when the only issues you can actually name are 20 years old and based on one specific implementation, rather than PHP as a language, it doesn't reflect poorly on PHP. It reflects poorly on your critical thinking skills—or, at the very least, your ability to persuasively argue.
But you call it out as "garbage", claim that you—personally—have "plenty of other issues" besides the ancient history you specifically cited, but do not elaborate and expect us to just take your word for it.
You're asking us to value your low opinion of it, but you're not giving us any good reason to do so.