Re: unsigned long int

From: Date: Mon, 10 May 2004 20:35:48 +0000
Subject: Re: unsigned long int
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-185860@lists.php.net to get a copy of this message
René Fournier wrote:
I don't know C, but I was wondering if it is possible to: 1. Define 32-bit integer in PHP, called $val (max value of $val); 2. Assign the value of 10 to $val. 3. Pack $val to a binary variable ($bin_var); ...such that $val is only equal to 10, but it is occupying 32-bits of data... (In case you were wondering, am I quite lost, yes, I am.) ...Rene
http://www.php.net/pack $val = 10; $bin_var = pack('i', $val);

« previous php.general (#185860) next »