php man page for gmp_testbit

Query: gmp_testbit

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

GMP_TESTBIT(3)								 1							    GMP_TESTBIT(3)

gmp_testbit - Tests if a bit is set

SYNOPSIS
bool gmp_testbit (GMP $a, int $index)
DESCRIPTION
Tests if the specified bit is set.
PARAMETERS
o $a -Either a GMP number resource in PHP 5.5 and earlier, a GMP object in PHP 5.6 and later, or a numeric string provided that it is possible to convert the latter to a number. o $index - The bit to test
RETURN VALUES
Returns TRUE if the bit is set in resource $a, otherwise FALSE.
ERRORS
/EXCEPTIONS An E_WARNING level error is issued when $index is less than zero, and FALSE is returned.
EXAMPLES
Example #1 gmp_testbit(3) example <?php $n = gmp_init("1000000"); var_dump(gmp_testbit($n, 1)); gmp_setbit($n, 1); var_dump(gmp_testbit($n, 1)); ?> The above example will output: bool(false) bool(true)
SEE ALSO
gmp_setbit(3), gmp_clrbit(3). PHP Documentation Group GMP_TESTBIT(3)
Related Man Pages
isset(3) - php
is_dir(3) - php
gmp_gcdext(3) - php
gmp_strval(3) - php
is_float(3) - php
Similar Topics in the Unix Linux Community
User Guide: Posting in the Emergency Forum
Rules for Homework &amp; Coursework Questions Forum
UNIX.COM 2017 Year End Summary
Status of UNIX.COM Forum Transformation
The Order of the Wizard's Hat - Lifetime Achievement Award 2019 - Congrats to Don Cragun