PHP. Руководство по PHP. 2005
gmp_setbit
gmp_setbit
Description
void gmp_setbit (resource &a, int index [, bool set_clear])Sets bit index in a. set_clear defines if the bit is set to 0 or 1. By default the bit is set to 1. Index starts at 0.
Замечание: Unlike most of the other GMP functions, gmp_setbit() must be called with a GMP resource that already exists (using gmp_init() for example). One will not be automatically created.