note 98014 deleted from function.is-numeric by danbrown
| Newsgroups | php.notes |
|---|---|
| Message-ID | <[email protected]> |
Note Submitter: Anonymous
----
In addition to dustout at gmail dot com code example, just spare the if and reduce the two return statements into one:
<?php
function is_hex($hexValue){
return (bool) ($hexValue == dechex(hexdec($hexValue));
}
?>