PHP offers several functions for generating random numbers, but the most commonly used are rand(), mt_rand(), and for cryptographic purposes, random_int().
rand()
mt_rand()
random_int()
PHP offers a few ways to round numbers.
PHP provides built-in support for complex numbers using the ext-intl extension with the NumberFormatter class.
ext-intl
NumberFormatter