PHP GMP gmp_cmp() FunctionPHP has a built-in function called gmp_cmp() that is used to compare two GMP numbers. SyntaxThe following syntax shows a clear bit function using GMP numbers. Parameter
Return Value
ExamplesThe following examples show the "comparison" function using the GMP parameters. Example1: The following example shows the basic comparison operation using the GMP function. Output: The following output image shows the basic comparison operation using the GMP function. Example2: The following example shows the comparison operation using the GMP function. Output: The following output image shows the comparison operation using the GMP function. Example3: the following example shows a comparison of the two values using the "gmp_cmp()" operator. Output: The following output shows the comparison values using the GMP function. Example4: the following example shows the operation of the two values using the "gmp_cmp()" function. This function uses variable, other GMP functions with the "gmp_abs" function. Output: The following output shows the "AND" comparison value. Example5: the following example shows the "gmp_cmp" with the "gmp_init" function. Output: The following output shows the comparison value. ConclusionThe "gmp_cmp()" function uses to compare two parameters with a single operation. It is a comparison operation with numerical GMP parameters. Next TopicPHP GMP gmp_com() Function |