Integer as a string?

From: Date: Mon, 24 Jul 2000 04:30:03 +0000
Subject: Integer as a string?
Groups: php.general 
Request: Send a blank email to php-general+get-7819@lists.php.net to get a copy of this message
The url does not contain types, so everything you extract from it is a string, after that if you want to interpretate what you got trough it as types is ok, but you have to doit explicit, by types convertion, here is your code modified > <? > $ev = gettype ((int)$foo); > echo $ev; > ?> Remember that php is not compiled but interpreted, this means that php has not types verification, variables are just what is needed at some time, what variables are is infered from the operation that is been processed, or can be told explicitly by (int)$var, (double)$var, (string)$var and so... Otto

« previous php.general (#7819) next »