Developing ICanBoogie, I always try my best to make it fast despite adding nicer and nicer features. I had very nice timings with PHP 5.6 but now with PHP 7 it's on another level. For instance, on this shared host (around 4€/month), it takes ICanBoogie 1ms to boot and 5 ms to return a response for the home page; that is routing, checking for new/updated articles, fetching records, rendering… and all that stuff. Basically, it's 3 times faster with PHP 7.
You can check it out for yourself in the source code of the page, with a comment at the top similar to this one:
<!-- booted in: 1.223 ms, completed in 4.705 ms -->
On the /api/ping
endpoint (http://olvlvl.com/api/ping?timer), which is often used to check the
overhead of the framework, timings are similar to this:
pong, in 1.818 ms (ready in 1.214 ms)
PHP 7 and all that jazz
Speed improvements aside, PHP 7 has so many great features I can't wait to implement:
- Anonymous classes, how sexy is that!?
- Return type declarations
- Type declarations improvements
- Expectations
- And of course the engine throwing exceptions instead of dying with fatal errors <3 (Also Throwable <3)
tl;dr
ICanBoogie is pretty fast, with PHP 7 it's faster.