gmp_clrbit

(PHP 4 >= 4.0.4, PHP 5)

gmp_clrbitClear bit

說明

void gmp_clrbit ( GMP $a , int $index )

Clears (sets to 0) bit index in a. The index starts at 0.

參數

a

可以是一個 GMP 數據 resouce,或一個可以轉換為數值的字串。

index

The index of the bit to clear. Index 0 represents the least significant bit.

回傳值

GMP 數值資源.

範例

Example #1 gmp_clrbit() example

<?php
$a 
gmp_init("0xff");
gmp_clrbit($a0); // index starts at 0, least significant bit
echo gmp_strval($a) . "\n";
?>

上例將輸出:

254

註釋

Note:

Unlike most of the other GMP functions, gmp_clrbit() must be called with a GMP resource that already exists (using gmp_init() for example). One will not be automatically created.

參見

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top