in reply to Checking whether a $var is a number
To Quote:
hsmThe special IEEE notions of Infinity and NaN (not a number) will be pr +operly honored: $n = 'NaN'; print 2 * $n; NaN print 10 * $n NaN print 1 + NaN NaN $i = 'Infinity' print 1 + $i Infinity print $i * $i Infinity print $i - $i NaN print 'Infinity' < 0 0 print 'Infinity' > 0 1
Edit by tye to change very wide BLOCKQUOTE+PRE to CODE
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Checking whether a $var is a number
by blakem (Monsignor) on Sep 06, 2001 at 02:21 UTC |