note 70926 deleted from function.is-numeric by nlopess
| From: | nlopess@php.net | Date: | Sat, 04 Nov 2006 11:00:41 +0000 |
| Subject: | note 70926 deleted from function.is-numeric by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-119390@lists.php.net to get a copy of this message | ||
Note Submitter: inbox at bjornroesbeke dot be
----
PHP doesn't seem to have trouble checking negative zeros...
<?php
/* negative (string) zero numeric check */
$var = "0";
is_numeric($var); //outputs true
$var = "-0";
is_numeric($var); //outputs true
/* negative (integer) numeric check */
$var = 0;
is_numeric($var); //outputs true
$var = -0;
is_numeric($var); //outputs true
?>