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);

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to