PHP | gmp_export() function Last Updated : 11 Jul, 2025 Comments Improve Suggest changes Like Article Like Report The gmp_export() function is an inbuilt function in PHP which exports a GMP number(GNU Multiple Precision: For Large Numbers) to a binary string. Syntax: string gmp_export ( GMP $gmpnumber, int $word_size, int $options ) Parameters: The gmp_export() function accepts three parameters as shown above and described below: $gmpnumber: This is a required parameter of gmp_export() function, it is the number to be exported by the function.$word_size: This parameter contains the number of bytes in each chunk of binary data. This parameter is mainly used simultaneously with the options parameter. The default value of this parameter is 1.$options: This parameter has default value of GMP_MSW_FIRST | GMP_NATIVE_INDIAN. Return Value: The function returns a string on success and FALSE on failure. Below program illustrate the gmp_export() function in PHP: PHP <?php // PHP code implementing the gmp_export function // The gmp_init() function creates a gmp number // form a string or number $number = gmp_init(16705); echo gmp_export($number) . "\n"; ?> Output: AA Related Articles: PHP | gmp_add() for adding large numbersPHP | gmp_invert() for inverse moduloPHP | gmp_rootrem() Function Reference: https://www.php.net/manual/en/function.gmp-export.php Comment P priya_1998 Follow 0 Improve P priya_1998 Follow 0 Improve Article Tags : Web Technologies PHP PHP-function PHP-gmp Explore PHP Tutorial 8 min read BasicsPHP Syntax 4 min read PHP Variables 5 min read PHP | Functions 8 min read PHP Loops 4 min read ArrayPHP Arrays 5 min read PHP Associative Arrays 4 min read Multidimensional arrays in PHP 5 min read Sorting Arrays in PHP 4 min read OOPs & InterfacesPHP Classes 2 min read PHP | Constructors and Destructors 5 min read PHP Access Modifiers 4 min read Multiple Inheritance in PHP 4 min read MySQL DatabasePHP | MySQL Database Introduction 4 min read PHP Database connection 2 min read PHP | MySQL ( Creating Database ) 3 min read PHP | MySQL ( Creating Table ) 3 min read PHP AdvancePHP Superglobals 6 min read PHP | Regular Expressions 12 min read PHP Form Handling 4 min read PHP File Handling 4 min read PHP | Uploading File 3 min read PHP Cookies 9 min read PHP | Sessions 7 min read Like