downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

gmp_cmp> <gmp_and
Last updated: Fri, 13 Nov 2009

view this page in

gmp_clrbit

(PHP 4 >= 4.0.4, PHP 5)

gmp_clrbitビットをクリアする

説明

void gmp_clrbit ( resource $a , int $index )

a のビット index をクリア (0 に設定) します。index は 0 から始まります。

パラメータ

a

GMP 数リソース、 あるいは数値に変換可能な数値形式の文字列。

index

GMP 数リソース、 あるいは数値に変換可能な数値形式の文字列。

返り値

GMP 数リソースを返します。

例1 gmp_clrbit() の例

<?php
$a 
gmp_init("0xff");
gmp_clrbit($a0); // インデックスは 0 から始まり、これは最下位ビットを表します
echo gmp_strval($a) . "\n";
?>

上の例の出力は以下となります。

254

注意

注意: 他の大半の GMP 関数とは異なり、gmp_clrbit() は必ず既存の GMP リソース (例えば gmp_init() を使用して取得したもの) を使用してコールしなければなりません。 リソースは自動的には作成されません。

参考



add a note add a note User Contributed Notes
gmp_clrbit
There are no user contributed notes for this page.

gmp_cmp> <gmp_and
Last updated: Fri, 13 Nov 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites