PHP gmp_or() functionPHP 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. SyntaxThe following syntax shows the GMP bitwise OR function. ParameterThe syntax shows two source parameters for the "OR" operation. The two parameters are numerical values. Return ValueThis function gives an exclusive OR value of the two numerical data. It is the bitwise comparison of the numerical value as an output. ExamplesThe 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. 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. 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. 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. Example5: the following example shows the "gmp_or" with the "gmp_init" function. Output: The following output shows the "OR" comparison value. ConclusionThe "gmp_or()" function uses to compare two parameters with bitwise OR operation. It is the logical operation with numerical GMP parameters. Next TopicPHP gmp_divexact() Function |