is_numeric() vs. is_float() vs. is_int()

前端 未结 2 1782
感动是毒
感动是毒 2021-02-05 12:45

My understanding is...

if is_numeric($input) === true

then either

is_float($input) === true OR

is_int($input) =

2条回答
  •  南笙
    南笙 (楼主)
    2021-02-05 12:57

    See the docs. A numeric value can be:

    • An integer
    • A float
    • Exponential
    • A positive Hexadecimal
    • A string containing most of these

提交回复
热议问题