php8.5
Home/ Manual/ sodium / functions/ sodium_add

sodium_add

PHP function Edit on GitHub ✎

(PHP 7 >= 7.2.0, PHP 8)

Add large numbers

Description

sodium_add(string $string1, string $string2): void

This adds the parameter string2 to string1, overwriting the value stored in string1. This function assumes both parameters are binary strings that represent unsigned integers in little-endian byte order.

Parameters

string1

String representing an arbitrary-length unsigned integer in little-endian byte order. This parameter is passed by reference and will hold the sum of the two parameters.

string2

String representing an arbitrary-length unsigned integer in little-endian byte order.

Return Values

Void

Source: reference/sodium/functions/sodium-add.xml · from the official PHP manual (php/doc-en)