Query: gmp_pow
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
GMP_POW(3) 1 GMP_POW(3) gmp_pow - Raise number into powerSYNOPSISGMP gmp_pow (GMP $base, int $exp)DESCRIPTIONRaise $base into power $exp.PARAMETERSo $base - The base number. Either a GMP number resource in PHP 5.5 and earlier, a GMP object in PHP 5.6 and later, or a numeric string provided that it is possible to convert the latter to a number. o $exp - The positive power to raise the $base.RETURN VALUESThe new (raised) number, as a GMP number. The case of 0^0 yields 1.EXAMPLESExample #1 gmp_pow(3) example <?php $pow1 = gmp_pow("2", 31); echo gmp_strval($pow1) . " "; $pow2 = gmp_pow("0", 0); echo gmp_strval($pow2) . " "; $pow3 = gmp_pow("2", -1); // Negative exp, generates warning echo gmp_strval($pow3) . " "; ?> The above example will output: 2147483648 1 PHP Documentation Group GMP_POW(3)