The PHP Function is_Nan
The php function is_nan is used to check whether a value is not a number, also known as a Non-Number (NaN). NaN values are the result of certain mathematical operations, such as dividing zero by zero.
In addition to the normal float value range, there are special values such as INF and -INF. INF is a number that represents infinity, while -INF is the opposite of a number and equals to -INF
It's important to understand the semantics of floating point numbers as they are represented in PHP and other statically-typed languages. For example, most statically-typed languages interpret division of two integers in a way that preserves the fractional part of the result. This is in contrast to the float representation that uses underscores as separators between digits in a numeric literal.
In the next chapter we will explore functional programming and start to see how PHP enables you to write functional code by taking advantage of first-class, higher-order functions and closures. Moreover, we will learn how to glue these functions together in a flow that will create immutable data structures that you can use as the foundation of your applications.