Nextcloud and owncloud are written in PHP like so are many other web server apps, especially wiki servers.
I've always had misgivings about the security of using and running PHP. Does PHP software still tend to be insecure as in the past? Why are there so many web apps (especially wiki servers) written in PHP instead of e.g. Python, Rust or some other language?