How to distinguish a string with the text from line number without regexps?

come data:
$var = 'toaster'; // string
# or 
$var = '3'; // string
# or
$var = '1.89'; // string

I need to skip only the last two options, if the string looks like a number if plain text is to return false.
How can you just implement this without regular expressions?
March 23rd 20 at 19:33
1 answer
March 23rd 20 at 19:35
Solution
Checks whether a variable is a number or string containing number

Seen but incorrectly interpreted the description, thank you.
Thought a little bit not how it works. - mustafa_Schup commented on March 23rd 20 at 19:38

Find more questions by tags PHP