public function readLast()
    {

        $len = strlen($this->data);
        $string = $this->data{strlen($this->data) - 1};
        $this->data = substr($this->data, 0, $len - 1);
        $this->length -= 1;

        return $string;
    }
public function readLast()
    {

        $len = strlen($this->data);
        $string = $this->data{strlen($this->data) - 1};
        $this->data = substr($this->data, 0, $len - 1);
        $this->length -= 1;

        return $string;
    }
public function readLast ( ) { $ len = strlen ( $ this -> data ) ; $ string = $ this -> data { strlen ( $ this -> data ) - 1 } ; $ this -> data = substr ( $ this -> data , 0 , $ len - 1 ) ; $ this -> length -= 1 ; return $ string ; }
Read the last character from the buffer

Unlike the other read functions, this function actually removes
the character from the buffer.

@return string
Read the last character from the buffer