I was able to migrate some php script into C and C ++ in my current part-time job, so it's not a problem for me to do the same thing with your php code.
I've used Unix in my previous job and I currently use Linux (Arch, Ubuntu server, and Debian).
I'm able to program a multithreading applicactions with C++11.