For those of you using Laravel and trying to run composer install and getting an mcrypt error (Laravel requires the Mcrypt PHP extension.), this will fix it for you.

I use homebrew and have php 5.6 installed.

for mcrypt:

$ brew install mcrypt

for the mcrypt php extension:

$ brew install php56-mcrypt

It’s really that easy.

php-56 mcrypt