note 17091 added to ref.ctype
| From: | gamr at outworld dot cx | Date: | Mon, 26 Nov 2001 06:22:58 +0000 |
| Subject: | note 17091 added to ref.ctype | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-21274@lists.php.net to get a copy of this message | ||
better way than
if ( $var != "0" && $var / 1 == 0 ) { }
is
if ( $var == (int) $var ) { }
faster and simpler :) you may want === instead, thats upto you but then you'd be better doing
an is_long on the var
--
http://www.php.net/manual/en/ref.ctype.php
http://master.php.net/manage/user-notes.php?action=edit+17091
http://master.php.net/manage/user-notes.php?action=delete+17091
http://master.php.net/manage/user-notes.php?action=reject+17091