gmp_and

(PHP 4 >= 4.0.4, PHP 5)

gmp_andBitwise AND

說明

GMP gmp_and ( GMP $a , GMP $b )

Calculates bitwise AND of two GMP numbers.

參數

a

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

b

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

回傳值

A GMP number representing the bitwise AND comparison.

範例

Example #1 gmp_and() example

<?php
$and1 
gmp_and("0xfffffffff4""0x4");
$and2 gmp_and("0xfffffffff4""0x8");
echo 
gmp_strval($and1) . "\n";
echo 
gmp_strval($and2) . "\n";
?>

上例將輸出:

4
0
add a note add a note

User Contributed Notes

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