The GMP library can be downloaded from » http://gmplib.org/#DOWNLOAD. This site also has the GMP manual available.
At least GMP version 2 is required, with some functions requiring a more recent version of the GMP library.
In order to have these functions available, PHP must be compiled with GMP support by using the --with-gmp option.
Prior to PHP 5.6, most GMP functions operate on or return GMP number resources. PHP 5.6 onwards uses GMP objects in place of GMP number resources.