PHP 8.3.4 Released!

gmp_or

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

gmp_orビット OR を計算する

説明

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

2 つの GMP 数のビット OR を計算します。

パラメータ

num1

GMP オブジェクト、整数、あるいは数値に変換可能な数値形式の文字列。

num2

GMP オブジェクト、整数、あるいは数値に変換可能な数値形式の文字列。

戻り値

GMP オブジェクトを返します。

例1 gmp_or() の例

<?php
$or1
= gmp_or("0xfffffff2", "4");
echo
gmp_strval($or1, 16) . "\n";
$or2 = gmp_or("0xfffffff2", "2");
echo
gmp_strval($or2, 16) . "\n";
?>

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

fffffff6
fffffff2

add a note

User Contributed Notes

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