Get the App
SLTechnology News&Howtos  ›  Development  › 

Is bcadd a function or an extension in php

Shulou Source: shulou.com Published: 2022-06-03 13:51:16 11月14日 Update

This article mainly shows you "bcadd in php is a function or an extension", the content is simple and easy to understand, organized clearly, I hope to help you solve doubts, let Xiaobian lead you to study and learn "bcadd in php is a function or an extension" this article bar.

bcadd is a function in php that calculates the addition of two arbitrary precision numbers. The syntax of this function is as follows: "bcadd(string $num1, string $num2, ? int $scale = null): string"。

Operating environment: Windows 7 system, PHP 7.1 version, DELL G3 computer

Is bcadd php a function or an extension?

bcadd is a function in php.

bcadd: Addition of two numbers of arbitrary precision

description

bcadd(string $num1, string $num2, ? int $scale = null): string

Sum num1 and num2.

Parameters:

num, left operand, string type.

num2, right operand, string type.

scale, an optional parameter that sets the number of decimal places after the decimal point in the result. You can also set the global default scale for all functions by using bcscale(). If not set, the default is 0.

Return Value: Returns the sum of two operands as a string.

Update Log: 8.0.0 Scale can now be null.

Example: bcadd() Example

The above is "bcadd in php is a function or extension" all the content of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!

Tags: Function or two content character string Operand article number of digits addition parameter decimal number example type precision result learning help small and medium Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Xiaomi Apple OPPO Reno Linux