Home > PHP > Function > GMP > gmp_testbit()

gmp_testbit()

gmp_testbit - Tests if a bit is set

Syntax

bool gmp_testbit (resource $a, int $index)

Arguments

  • a - 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 bit to test

Description

Tests if the specified bit is set.

Version

PHP 5.3.0

Return value

Returns TRUE on success or FALSE on failure.