(PHP 4 >= 4.0.4, PHP 5)
Returns 1 if a is positive, -1 if a is negative, and 0 if a is zero.
a
Przykład 1. gmp_sign() example
<?php// positiveecho gmp_sign("500") . "\n";// negativeecho gmp_sign("-500") . "\n";// zeroecho gmp_sign("0") . "\n";?>
The printout of the above program will be:
1 -1 0