← All docs

gmp_perfect_square()

Checks whether a GMP number is a perfect square.

gmp_perfect_square()

function gmp_perfect_square(object|string|int $num): bool

Checks whether a GMP number is a perfect square.

Parameters:

  • $num (object|string|int)

Returns: bool

Availability

Compiled (AOT)Magician (eval)
AvailableAvailable

No examples yet. Check examples/ and showcases/ for usage patterns.

Internals

For how gmp_perfect_square is implemented in the compiler, see the internals page.