PHP.nl

gmp_and

gmp_and

Bitwise AND

GMP **gmp_and**  $num1  $num2

Calculates bitwise AND of two GMP numbers.

num1``num2

A GMP number representing the bitwise comparison. AND

Voorbeeld: example

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