... It was compared between "with reference" and "without reference" (the rest of the code was the same) ... i only wrongly posted the code from decrypt :-) not from encrypt....

So here again... the same code, one time using references and one time without:


Code without using reference:
```php
            case CRYPT_RIJNDAEL_MODE_CFB:
                // cfb loosely routines inspired by openssl's:
                // http://cvs.openssl.org/fileview?f=openssl/crypto/modes/cfb128.c&v=1.3.2.2.2.1
                $iv = $this->encryptIV;
                $pos = $this->continuousBuffer === true ? $buffer['pos'] : 0;
                $len = strlen($plaintext);
                $i = 0;
                if ($pos) {
                    $orig_pos = $pos;
                    $max = $block_size - $pos;
                    if ($len >= $max) {
                        $i = $max;
                        $len-= $max;
                        $pos = 0;
                    } else {
                        $i = $len;
                        $pos+= $len;
                        $len = 0;
                    }
                    // ie. $i = min($max, $len), $len-= $i, $pos+= $i, $pos%= $blocksize
                    $ciphertext = substr($iv, $orig_pos) ^ $plaintext;
                    $iv = substr_replace($iv, $ciphertext, $orig_pos, $i);
                }
                while ($len >= $block_size) {
                    $iv = $this->_encryptBlock($iv) ^ substr($plaintext, $i, $block_size);
                    $ciphertext.= $iv;
                    $len-= $block_size;
                    $i+= $block_size;
                }
                if ($len) {
                    $iv = $this->_encryptBlock($iv);
                    $block = $iv ^ substr($plaintext, $i);
                    $iv = substr_replace($iv, $block, 0, $len);
                    $ciphertext.= $block;
                    $pos = $len;
                }
                if($this->continuousBuffer) {
                    $this->encryptIV = $iv;
                    $buffer['pos']   = $pos;
                }
                break;
```

Speedtest for code without using references:
Time: 15.601
Time: 15.574
Time: 15.956


And here the same code, but using reference:
```php
            case CRYPT_RIJNDAEL_MODE_CFB:
                // cfb loosely routines inspired by openssl's:
                // http://cvs.openssl.org/fileview?f=openssl/crypto/modes/cfb128.c&v=1.3.2.2.2.1
                if ($this->continuousBuffer) {
                    $iv = &$this->encryptIV;
                    $pos = &$buffer['pos'];
                } else {
                    $iv = $this->encryptIV;
                    $pos = 0;
                }
                $len = strlen($plaintext);
                $i = 0;
                if ($pos) {
                    $orig_pos = $pos;
                    $max = $block_size - $pos;
                    if ($len >= $max) {
                        $i = $max;
                        $len-= $max;
                        $pos = 0;
                    } else {
                        $i = $len;
                        $pos+= $len;
                        $len = 0;
                    }
                    // ie. $i = min($max, $len), $len-= $i, $pos+= $i, $pos%= $blocksize
                    $ciphertext = substr($iv, $orig_pos) ^ $plaintext;
                    $iv = substr_replace($iv, $ciphertext, $orig_pos, $i);
                }
                while ($len >= $block_size) {
                    $iv = $this->_encryptBlock($iv) ^ substr($plaintext, $i, $block_size);
                    $ciphertext.= $iv;
                    $len-= $block_size;
                    $i+= $block_size;
                }
                if ($len) {
                    $iv = $this->_encryptBlock($iv);
                    $block = $iv ^ substr($plaintext, $i);
                    $iv = substr_replace($iv, $block, 0, $len);
                    $ciphertext.= $block;
                    $pos = $len;
                }
                break;
```
Speedtest for code using references:
Time: 15.403
Time: 15.529
Time: 15.499

It's everytime slightly faster on my linux machine, php 5.4.9

I know that using references are, normaly, slower then using non-ref vars. But in this case, it seems not :-) 
It would be interesting why in this case using ref's even a bit faster than using non-refs... 

Do you get simliar results, switching the encrypt() ofb code using the speedtest above?