gmp_or

(PHP 4 >= 4.0.4, PHP 5)

gmp_orBitwise OR

說明

GMP gmp_or ( GMP $a , GMP $b )

Calculates bitwise inclusive OR of two GMP numbers.

參數

a

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

b

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

回傳值

GMP 數值資源.

範例

Example #1 gmp_or() example

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

上例將輸出:

fffffff6
fffffff2

add a note add a note

User Contributed Notes

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