Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

bcadd(3) [php man page]

BCADD(3)								 1								  BCADD(3)

bcadd - Add two arbitrary precision numbers

SYNOPSIS
string bcadd (string $left_operand, string $right_operand, [int $scale]) DESCRIPTION
Sums $left_operand and $right_operand. PARAMETERS
o $left_operand - The left operand, as a string. o $right_operand - The right operand, as a string. o $ scale -This optional parameter is used to set the number of digits after the decimal place in the result. You can also set the global default scale for all functions by using bcscale(3). RETURN VALUES
The sum of the two operands, as a string. EXAMPLES
Example #1 bcadd(3) example <?php $a = '1.234'; $b = '5'; echo bcadd($a, $b); // 6 echo bcadd($a, $b, 4); // 6.2340 ?> SEE ALSO
bcsub(3). PHP Documentation Group BCADD(3)

Check Out this Related Man Page

DECHEX(3)								 1								 DECHEX(3)

dechex - Decimal to hexadecimal

SYNOPSIS
string dechex (int $number) DESCRIPTION
Returns a string containing a hexadecimal representation of the given unsigned $number argument. The largest number that can be converted is PHP_INT_MAX * 2 + 1 (or -1): on 32-bit platforms, this will be 4294967295 in decimal, which results in dechex(3) returning ffffffff. PARAMETERS
o $number - The decimal value to convert. As PHP's integer type is signed, but dechex(3) deals with unsigned integers, negative integers will be treated as though they were unsigned. RETURN VALUES
Hexadecimal string representation of $number. EXAMPLES
Example #1 dechex(3) example <?php echo dechex(10) . " "; echo dechex(47); ?> The above example will output: a 2f Example #2 dechex(3) example with large integers <?php // The output below assumes a 32-bit platform. // Note that the output is the same for all values. echo dechex(-1)." "; echo dechex(PHP_INT_MAX * 2 + 1)." "; echo dechex(pow(2, 32) - 1)." "; ?> The above example will output: ffffffff ffffffff ffffffff SEE ALSO
hexdec(3), decbin(3), decoct(3), base_convert(3). PHP Documentation Group DECHEX(3)
Man Page