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

search for in the

gmp_scan1> <gmp_random
Last updated: Fri, 13 Nov 2009

view this page in

gmp_scan0

(PHP 4 >= 4.0.4, PHP 5)

gmp_scan00 を探す

説明

int gmp_scan0 ( resource $a , int $start )

ビット start から最上位ビットの方に、 最初のクリアビットが見付かるまで a をスキャンします。

パラメータ

a

スキャンする数。

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

start

開始するビット。

返り値

ビットが見つかった場所のインデックスを整数値で返します。 インデックスは 0 から始まります。

例1 gmp_scan0() の例

<?php
// 0 番目から探しはじめ、3 番目の位置に "0" ビットが見つかります
$s1 gmp_init("10111"2);
echo 
gmp_scan0($s10) . "\n";

// 5 番目から探しはじめ、7 番目の位置に "0" ビットが見つかります
$s2 gmp_init("101110000"2);
echo 
gmp_scan0($s25) . "\n";
?>

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

3
7



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

gmp_scan1> <gmp_random
Last updated: Fri, 13 Nov 2009
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites