It might also be worth noting that this works for me with the brew build of PHP. It will probably work for the distribution that comes with OS X but I haven’t tested.
sudo pecl install gearman
Next copy the following contents into
(or wherever your extension config directory is):
sudo apachectl restart
That’s it. Test to make sure it’s loaded with