Home > PHP > Function > GMP > gmp_setbit()

gmp_setbit()

gmp_setbit - Set bit

Syntax

gmp_setbit (resource $a, int $index, bool $set_clear)

Arguments

  • a - The number being set to. It can be either a GMP number resource, or a numeric string given that it is possible to convert the latter to a number.
  • index - The set bit.
  • set_clear - Defines if the bit is set to 0 or 1. By default the bit is set to 1. Index starts at 0.

Description

Sets bit index in a.

Version

PHP 4.0.4, 5

Return value

A GMP number resource.