PHP gmp_add() FunctionThe addition operation uses in the application without mathematical operators and functionalities. PHP has a built-in function called gmp_add() that uses for the addition of the two figures. Here, we can use positive and negative numbers using a simple function. SyntaxThe following syntax shows the GMP addition's function. Parameters
Return Value:This function gives an added value or sum of the two numerical data. It is a numerical value displayed as an output. ExamplesThe following examples show the addition of the GMP parameters. Example1: the following example shows a basic addition function with value. The parameter uses positive data with simple values. Output The following output shows the addition of the value. Example2: the following example shows the summation of positive and negative values with value. The parameter uses one positive value and a second negative value with an additional function. Output The following output shows the added value. Example3: the following example shows a basic addition operation with negative values. The absolute function uses the sum of data to get the actual value. Output The following output shows the added value. Example4: the following example shows a basic addition function with value. The parameter uses variable values for the addition function. Output The following output shows the summation value. ConclusionThe addition function uses to add only two numbers using PHP GMP values. The function removes addition operations using operators and values.
Next TopicPHP gmp_and()Functions
|