Javatpoint Logo
Javatpoint Logo

PHP gmp_or() function

PHP GMP gives logical function called gmp_or() with parameter. The gmp_or() function uses to display a bitwise OR comparison between two numbers. This function uses for logical operation.

Syntax

The following syntax shows the GMP bitwise OR function.

Parameter

The syntax shows two source parameters for the "OR" operation.

The two parameters are numerical values.

Return Value

This function gives an exclusive OR value of the two numerical data. It is the bitwise comparison of the numerical value as an output.

Examples

The following examples show the "OR" function using the GMP parameters.

Example1: the following example shows basic bitwise "or" functions with value. the function uses a basic value as a parameter.

Output:

The following output shows bitwise the "OR" comparison value.

PHP gmp_or() function

Example2: the following example shows a comparison of the two values using the "OR" operator. The parameter uses negative values to get a bitwise "OR" operation.

Output:

The following output shows the "OR" comparison value.

PHP gmp_or() function

Example3: the following example shows a comparison of the two values using the "OR" operator. This function uses a variable with the "OR" function.

Output:

The following output shows the "OR" comparison value.

PHP gmp_or() function

Example4: the following example shows the bitwise operation of the two values using the "OR" operator. This function uses a variable, another GMP function with the "gmp_OR" function.

Output:

The following output shows the "OR" comparison value.

PHP gmp_or() function

Example5: the following example shows the "gmp_or" with the "gmp_init" function.

Output:

The following output shows the "OR" comparison value.

PHP gmp_or() function

Conclusion

The "gmp_or()" function uses to compare two parameters with bitwise OR operation. It is the logical operation with numerical GMP parameters.


Next Topic#





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA