Good points, I'll try it.

> Without testing it (it's late here), your binstr() function doesn't
> accept parameters, so it would always return the same result each time
> it's called, regardless of what you pass into it.

In case you want to check it tomorrow or later:

private function binstr() {
  $temp_bits = $this->bits;
  $str = "";
  for ($i=0;$i<32;$i++) {
    $str = strval($temp_bits & 1) . $str;
    $temp_bits >>= 1;
  return $str;

it doesn't accept parameters, but instead use private field $bits assigned
to $temp_bits (PHP manual states that it will be copied instead of
referenced, and it's exactly what I need).
View this message in context:
Sent from the PHP - General mailing list archive at

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to