Security flaws are on the programmer, not the programming language. PHP is easy to learn and has many built in functions useful for web developing, but if the programmer doesn’t know anything about security and ships trash code it’s only his fault, this is why Laravel is so popular
Don’t try to find a meaning in this, just switch to something FOSS. Look at how the 3D modeling world is since Blender became a real competitor.