PHP7 Reference

PHP7 Reference – An overview of the features, changes, and backward compatibility breakages in PHP 7

Unarguably the greatest part about PHP 7 is the incredible performance boosts it provides to applications. This is a result of refactoring the Zend Engine to use more compact data structures and less heap allocations/deallocations.

The performance gains on real world applications will vary, though many applications seem to recieve a ~100% performance boost – with lower memory consumption too!

The refactored codebase provides further opportunities for future optimisations as well (such as JIT compilation). So it looks like future PHP versions will continue to see performance enhancements too.

SSO with Nginx auth_request module

SSO with Nginx auth_request module – SSO as in Single Sign-On.  Absolutely beautiful solution for one set of requirements, and a horrendous for another.  Worth knowing though.

Nginx and Memcached, a 400% boost!

Here is an idea to try on a slow weekend: Nginx and Memcached, a 400% boost!

nginx_memcache

 

Memcached, the darling of every web-developer, is capable of turning almost any application into a speed-demon. Benchmarking one of my own Rails applications resulted in ~850 req/s on commodity, non-optimized hardware – more than enough in the case of this application. However, what if we took Mongrel out of the equation? Nginx, by default, comes prepackaged with the Memcached module, which allows us to bypass the Mongrel servers and talk to Memcached directly. Same hardware, and a quick test later: ~3,550 req/s, or almost a 400% improvement! Not bad for a five minute tweak!

git undo

The GitHub Blog runs a very handy post: How to undo (almost) anything with Git, which covers a variety of git scenarios which you’d want to undo – anything from typos in commit messages to handling of branches.

git

If you don’t feel like learning all that, have a look at gitjk (as in “just kidding”) tool that I linked to before.