bcadd

Add two arbitrary precision numbers

&reftitle.description; `string` `bcadd` `string` `num1` `string` `num2` ``int``null```scale`&null;

Sums `num1` and `num2`.

&reftitle.parameters;

`num1`

- The left operand, as a string.

`num2`

- The right operand, as a string.

&bc.scale.description;
&reftitle.returnvalues;

The sum of the two operands, as a string.

&reftitle.errors;

This function throws a ValueError in the following cases:

- `num1` or `num2` is not a well-formed BCMath numeric string.
- `scale` is outside the valid range.

&reftitle.changelog;

&Version; | &Description;
8.0.0 | `scale` is now nullable.

&reftitle.examples;

### `bcadd` example

    <?php

    $a = '1.234';
    $b = '5';

    echo bcadd($a, $b);     // 6
    echo bcadd($a, $b, 4);  // 6.2340

    ?>

&reftitle.seealso;

- `bcsub`