(PHP 4 >= 4.0.4, PHP 5)
Returns 1 if a is positive, -1 if a is negative, and 0 if a is zero.
Example 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
Hosting by: Hurra Communications Ltd.Generated: 2007-01-26 18:00:04