ERROR: failed to write /usr/lib/php/extensions/no-debug-non-zts-20160303/mongodb.so (copy(/usr/lib/php/extensions/no-debug-non-zts-20160303/mongodb.so): failed to open stream: Operation not permitted)
This problem is caused by the OS X 10.11 El Capitan's Rootless feature.
Reboot and hold ⌘ + R
Utilities -> Terminal
csrutil disable
Successfully disabled System Integrity Protection. Please restart the machine for the changed to take effect.
reboot
Don't forget to enable it!