Home > PHP > Function > GMP > gmp_perfect_square()

gmp_perfect_square()

gmp_perfect_square - Perfect square check

Syntax

bool gmp_perfect_square (resource $a)

Arguments

  • a - The number being checked as a perfect square. It can be either a GMP number resource, or a numeric string given that it is possible to convert the latter to a number.

Description

Check if a number is a perfect square.

Version

PHP 4.0.4, 5

Return value

Returns TRUE if a is a perfect square, FALSE otherwise.