curl -sS https://getcomposer.org/installer | php
detect_unicode = Off
$ curl ... | /Applications/MAMP/bin/php/php<your-version-here>/bin/php