Installing PHP7 mcrypt on Debian

I’ve run into this problem a few times when setting up development stacks for Laravel, OpenCart and some other frameworks – they require the mCrypt PHP extension, but it is not included in Debian 8.

After a few failed attempts and some Googling, this seems to work for me:

apt-get update
apt-get install mcrypt php7.0-mcrypt
apt-get upgrade
service apache2 restart

Of course, you need to be the root user to do this.

Array helpers trait

I’ve collected a number of utility functions for working with arrays over the years, mixed in with collections of ‘helper’ functions used in various projects and added to various classes.

They include testing for multi-dimensional arrays, obtaining a hash of an array and flattening arrays so they only contain values.

The way they were getting repeated in classes made me think they should be a trait:

Web Fonts Article

Very interesting article on A List Apart – Webfonts on the Prairie.

It’s a discussion about the adoption of webfonts, whether they should be used and how to overcome some of the problems they can cause (slow load times, etc.)

There’s an interesting quote from web designer Adam Morse:

There are a lot of arguments around why you should use webfonts. In none of those arguments, have I heard about a single problem being solved for users.

Web designers and developers can be dazzled by new technologies and forget about the ultimate aim – usable and functional websites for real people.