Hacker News new | ask | show | jobs
by codedokode 44 days ago
No, PHP interpreter is written in C where such things happen every 100 lines of code. If PHP interpreter was written in Rust, this vulnerability wouldn't exist.

To be fair, C has simplicity as an attractive feature (compared to other languages) but being memory-unsafe is unacceptable, so we need either memory-safe C or stop using it.

1 comments

Most interpreters or runtimes are written in unsafe languages. Including V8 (Chrome and Node), C#, and others. Also PHP is not really interpreted, it works just like C# or Java where it's compiled to bytecode that runs on a virtual machine.