PHP gmp_and()FunctionsPHP has a built-in logical function called gmp_and() or gmp_or(). The gmp_and() function uses to display bitwise AND comparison between two values. This function uses for logical operation using two parameters. SyntaxThe following syntax shows the GMP bitwise AND functions. Parameter:
Return Value:This function gives an exclusive AND value of the two numerical data. It is a bitwise comparison of numerical value as an output. ExamplesThe following examples show the "AND" function using the GMP parameters. Example1: the following example shows basic bitwise "and" functions with value. the function uses a basic value as a parameter. Output: The following output shows bitwise the "AND" comparison value. Example2: the following example shows a comparison of the two values using the "AND" operator. The parameter uses negative values to get the bitwise "AND" operation. Output: The following output shows the "AND" comparison value. Example3: the following example shows a comparison of the two values using the "AND" operator. This function uses a variable with the "AND" function. Output: The following output shows the "AND" comparison value. Example4: the following example shows the bitwise operation of the two values using the "AND" operator. This function uses variable, other GMP functions with the "gmp_and" function. Output: The following output shows the "AND" comparison value. Example5: the following example shows the "gmp_and" with the "gmp_init" function. Output: The following output shows the "AND" comparison value. ConclusionThe "gmp_and()" function uses to compare two parameters with bitwise AND operation. It is the logical operation with numerical GMP parameters. Next TopicPHP GMP gmp_clrbit() Function |