<?php
GMP gmp_abs ( GMP|int|string $num )
where,
$num = Parameter to be obtain the absolute value
?>
<?php
// You must test other values
$a01a = 256;
$a01b = -256;
$a01c = -0400;
$a01d = -0x100;
echo $a01a . ' ⇒ gmp_abs ( ' . $a01a . ' ) = ' .
gmp_abs($a01a) . '<br>[ DECIMAL POSITIVE = 256 ]<br><br>';
echo $a01b . ' ⇒ gmp_abs ( ' . $a01b . ' ) = ' .
gmp_abs($a01b) . '<br>[ DECIMAL NEGATIVE = -256 ]<br><br>';
echo $a01c . ' ⇒ gmp_abs ( ' . $a01c . ' ) = ' .
gmp_abs($a01c) . '<br>[ OCTAL NEGATIVE = -0400 ]<br><br>';
echo $a01d . ' ⇒ gmp_abs ( ' . $a01d . ' ) = ' .
gmp_abs($a01d) . '<br>[ HEXADECIMAL NEGATIVE = -0x100 ]<br><br>';
?>