note 7204 modified in function.is-integer by zak

From: Date: Tue, 11 Sep 2001 16:41:20 +0000
Subject: note 7204 modified in function.is-integer by zak
Groups: php.notes 
Request: Send a blank email to php-notes+get-17913@lists.php.net to get a copy of this message
[Editor's Note: is_integer() returns the boolean value false if the variable is not of type integer. (PHP 4+) --zak@php.net] is_integer only check the datatype of the var, but not the actual value. Also, if the input value is not integer, the function will return empty (true in empty($rc) ) rather than 0. <br> E.g. <br> var1 = 1111; //is_integer(var1) -> 1 <br> var2 = '1111'; //is_integer(var2) -> empty <br> var3 = 'abcde'; //is_integer(var3) -> empty <br> P.S. the version of above result is PHP 3.0.8 Thx attention. http://www.php.net/manual/en/function.is-integer.php

« previous php.notes (#17913) next »