GMP gmp_and

(PHP 4 >= 4.0.4, PHP 5, PHP 7, PHP 8)

gmp_and — Bitwise AND


설명

gmp_and(GMP|int|string $num1, GMP|int|string $num2): GMP

두 GMP 번호의 비트 AND를 계산합니다.


매개변수

num1
GMP 개체, int 또는 숫자 문자열입니다.
num2
GMP 개체, int 또는 숫자 문자열입니다.

반환 값

비트 AND 비교를 나타내는 GMP 번호입니다.


Examples

예제 #1 gmp_and() 예제

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

위의 예는 다음을 출력합니다.

4
0