Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
PHP: gmp_scan1 - Manual
[go: Go Back, main page]

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

search for in the

gmp_setbit" width="11" height="7"/> <gmp_scan0
Last updated: Mon, 05 Feb 2007

view this page in

gmp_scan1

(PHP 4 >= 4.0.4, PHP 5)

gmp_scan1 — 1 を探す

説明

int gmp_scan1 ( resource a, int start )

ビット startから最上位ビットの方に、 セットされているビットが最初に見付かるまで a を探します。見付かったビットのインデックスを返します。 セットされているビットが存在しない場合には -1 が返されます。

例 755. gmp_scan1() の例

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

// 5 番目から探しはじめ、9 番目の位置に "1" ビットが見つかります
$s2 = gmp_init("01000001111", 2);
echo
gmp_scan1($s2, 5) . "\n";
?>

上のプログラムの出力は以下のようになります。


3
9

     



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

gmp_setbit" width="11" height="7"/> <gmp_scan0
Last updated: Mon, 05 Feb 2007
 
 
show source | credits | sitemap | contact | advertising | mirror sites