I noticed PHP is_numeric()
accepts "E" as a number.
I have a string: "88205052E00
" and I want the result to be: NOT numeric.
Here is the code which I tested.
<?php
$notnumber = '88205052E00';
if(is_numeric($notnumber)) {
echo $notnumber . ' is a number';
} else {
echo $notnumber . ' is NOT a number';
}
?>
The Code above gives result:
88205052E00 is a number
How can I get the result to be: 88205052E00 is NOT a number?
E
is used in scientific notation, so yes, it is considered a valid number. – Empirical0-9
characters. And handles decimals.
if you need them. – Bug88205052E00
is a number. It is88205052*10^0
which is exactly88205052
. – Babirusa