Javatpoint Logo
Javatpoint Logo

PHP gmp_div_qr() Function

The division operation uses in the web application without mathematical operators. PHP language has a built-in function called gmp_div_qr() that uses for the division operation. Here, we can get a reminder and quotient value using a simple function.

Syntax

The following syntax shows the GMP division's function.

Parameters

  • This function uses two parameters as a resource and gives the output of the division function.
  • The GMP function requires two parameters for getting the operation's quotient operation.

Return Value:

This function gives a quotient and remainder value of the two numerical data.

Examples

The following examples show the division of the GMP parameters.

Example1: the following example shows a basic division operation with GMP value. The parameter uses positive values.

Output:

The following output shows the division operation and reminder, and quotient operation.

PHP gmp_div_qr() Function

Example2: the following example shows a basic division operation with GMP value. The parameter uses negative values.

Output:

The following output shows the division operation and reminder, and quotient operation.

PHP gmp_div_qr() Function

Example3: the following example shows basic division functions with value. The parameter uses variable values for the division function.

Output:

The following output shows the division operation and its variable value.

PHP gmp_div_qr() Function

Example4: the following example shows basic division functions with value. The parameter uses variable values for the division function.

Output:

The following output shows the division operation and its variable value.

PHP gmp_div_qr() Function

Conclusion

The division "gmp_div_qr()" function uses to get quotient and reminder of division operation using PHP GMP values. Here, we get array type values of the division function.







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