Talking about things PHP is bad for (1/2) Show more
So I was writing a small webapp in PHP that dealt with audio files. That was okay.. right up until I needed to do some stuff with their metadata and make it filetype agnostic.
The PHP way to solve this was mounting up to be several dependencies and a lot of work to do on my end just to make my stuff work with those dependencies and even possibly considering using an entire framework which would mean more work managing those dependencies.
Talking about things PHP is bad for (2/2) Show more
How did I solve this?
I didn’t. At least not in PHP. I wrote a **150 line** application in Rust and called it with shell_exec in my PHP code and then parsed the stdout. Yes, the Rust application had dependencies but they were managed with cargo and I had to do basically nothing to get it up and running.
PHP has its uses, but devs really gotta stop trying to use it for everything because its language tooling is decrepit.