note 18780 deleted from function.intval by philip
| From: | philip@php.net | Date: | Wed, 26 Mar 2003 00:49:55 +0000 |
| Subject: | note 18780 deleted from function.intval by philip | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-45821@lists.php.net to get a copy of this message | ||
In response to the Editor's note for the post by nefer@ncport.ru
(15-Dec-2000 05:20):
The expression
if (intval($param) == $param)
...
returns also always true. Obviously $param on the right side is casted implicitly to an integer, in
the same manner like on the left side.
If you cast the left side back to string it works:
if ((string)intval($param) == $param)
// $param is an integer
else
// $param is no integer