The documentation is pretty clear about gmp_export(): "Export a GMP number to a binary string". ;)
It's actually an elaborate pack(); besides that it obviously works for large numbers, you cannot only choose endianess, but also the $word_size.
Originally posted by @cmb69 in php/php-src#16418 (comment)