Re: Re: Bitwise &

From: Date: Tue, 20 Nov 2001 03:36:23 +0000
Subject: Re: Re: Bitwise &
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-75198@lists.php.net to get a copy of this message
On Tue, 20 Nov 2001 13:12, Fred wrote: > OK, it seems as though I was on the right track. I cast the variables > as integers and all is well. Thanks to Rasmus and his msg: > > http://www.phpbuilder.com/mail/php-developer-list/199901/0485.php > > A question remains: why are variables that are initially set to numbers > not cast as integers? > > According to the manual variables are initially cast as integers if > they are created with an assignment to an integer number. While this > is the case with variables assigned in code (i.e. $One = 16) it appears > not to be the case with GET variables passed via the URL. Anything coming via get/post is a string, regardless of what it looks like :-). -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA "This is the Netherlands," Tom stated flatly.

« previous php.general (#75198) next »