Change language

PHP Gmp_clrbit () Function

Syntax:
gmp_clrbit ($num, $index) 
Parameters:the function takes two required parameters $numand $index,as shown in the above syntax. These parameters are: -
  • $num:This can be either a GMP number resource in PHP 5.5, a GMP object in PHP 5.6 and later, or numeric strings can be passed to a function, provided the strings can be converted to numbers.
  • $index:the index of the bit to be cleared. Indexing starts at 0, where index 0 represents the least significant bit.
Return Values:This function returns a GMP number (in PHP 5.5 and earlier) or an object GMP (in PHP 5.6 and later), which is a number generated after the bit at the specified index is set to 0.Examples:
 Input: $num = 255, $index = 0 Output: 254 Input: $num = 128, $index = 7 Output: 0 
The programs below illustrate the gmp_clrbit() function:Program 1 :
// PHP illustration program
// gmp_clrbit() function $num = gmp_init (255); gmp_clrbit ( $num , 0); // index starts at 0, least significant bit echo gmp_strval ( $num ); ?>
Exit :
254 
Program 2 :
// PHP illustration program
// gmp_clrbit() function $num = gmp_init ( "314567128" ); gmp_clrbit ( $num , 8); // index starts at 0, least significant bit echo gmp_strval ( $num ); ?>
Exit :
314566872 
Link: http://php.net/manual/en/function.gmp-clrbit.php

Shop

Learn programming in R: courses

$

Best Python online courses for 2022

$

Best laptop for Fortnite

$

Best laptop for Excel

$

Best laptop for Solidworks

$

Best laptop for Roblox

$

Best computer for crypto mining

$

Best laptop for Sims 4

$

Latest questions

NUMPYNUMPY

psycopg2: insert multiple rows with one query

12 answers

NUMPYNUMPY

How to convert Nonetype to int or string?

12 answers

NUMPYNUMPY

How to specify multiple return types using type-hints

12 answers

NUMPYNUMPY

Javascript Error: IPython is not defined in JupyterLab

12 answers


Wiki

Python OpenCV | cv2.putText () method

numpy.arctan2 () in Python

Python | os.path.realpath () method

Python OpenCV | cv2.circle () method

Python OpenCV cv2.cvtColor () method

Python - Move item to the end of the list

time.perf_counter () function in Python

Check if one list is a subset of another in Python

Python os.path.join () method