PHP is_infinite() Function

12 Jan 2025 | 1 min read

The is_infinite() is important PHP mathematical function, which is used to check whether a value is infinite or not.

It will returns true value when infinite number, otherwise it returns false /nothing.

Syntax:

ParameterDescriptionRequired/Optional
ValueThe value to checkRequired

Example 1

Output:

 bool(false) 

Example 2

Output:

 bool(true) 

Example 3

Output:

 bool(false) 

Example 4

Output:

 Your value is 2 By using 'is_infinite()' Function your value is: 

Example 5

Output:

 Your value is 2000 By using 'is_infinite()' Function your value is: 

Note: It will returns true value when infinite number, otherwise it returns false /nothing.

Example 6

Output:

 Your value is : log(0) By using 'is_infinite()' Function your value is:1