Isn’t this how Facebook’s Hack started out as well, before moving on to a JIT? Interesting how Facebook’s Russian competitor is doing the same years later.
You never know for sure, but the plan is that it’s always going to be AOT compiled and it’ll not become a completely different language like Hack.
KPHP is a compiled (and quite strict) subset of PHP with some features like tuples that are easily emulated with kphp-polyfills in normal PHP.
Developers use normal PHP during the development phase, so no KPHP VM is needed. When the code is deployed, it’s being compiled. It’s tempting to create your own language, but sometimes you need to limit your desires to stay practical. :)
Yep! Though according to the disclosure it has been used in production for a while. It is interesting to see a different take on this approach; personally I think JIT is the winner here but nonetheless it’s intriguing.
Am I right in thinking that with PHP8 it will begin compiling hot areas of code to native in order to get the best performance? I remember there being an option with PHP7 to do something like that but it had to be switched on and configured.
Isn’t this how Facebook’s Hack started out as well, before moving on to a JIT? Interesting how Facebook’s Russian competitor is doing the same years later.
According to https://github.com/vk-com/kphp-kdb, they did this in 2009.
You never know for sure, but the plan is that it’s always going to be AOT compiled and it’ll not become a completely different language like Hack.
KPHP is a compiled (and quite strict) subset of PHP with some features like tuples that are easily emulated with kphp-polyfills in normal PHP.
Developers use normal PHP during the development phase, so no KPHP VM is needed. When the code is deployed, it’s being compiled. It’s tempting to create your own language, but sometimes you need to limit your desires to stay practical. :)
Yep! Though according to the disclosure it has been used in production for a while. It is interesting to see a different take on this approach; personally I think JIT is the winner here but nonetheless it’s intriguing.
Am I right in thinking that with PHP8 it will begin compiling hot areas of code to native in order to get the best performance? I remember there being an option with PHP7 to do something like that but it had to be switched on and configured.
Hm, I though they open-sourced the thing earlier?
https://github.com/vk-com/kphp-kdb
It looks like this is a more cleaned up and up to date version. I think it’s also missing the KDB part but I’m not sure.