@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | */ |
| 77 | 77 | public function stream_read(int $count): string |
| 78 | 78 | { |
| 79 | - $p =& $this->position; |
|
| 79 | + $p = & $this->position; |
|
| 80 | 80 | $ret = substr($this->content, $p, $count); |
| 81 | 81 | $p += strlen($ret); |
| 82 | 82 | return $ret; |
@@ -91,10 +91,10 @@ discard block |
||
| 91 | 91 | */ |
| 92 | 92 | public function stream_write(string $data): int |
| 93 | 93 | { |
| 94 | - $v =& $this->content; |
|
| 94 | + $v = & $this->content; |
|
| 95 | 95 | $l = strlen($data); |
| 96 | - $p =& $this->position; |
|
| 97 | - $v = substr($v, 0, $p) . $data . substr($v, $p += $l); |
|
| 96 | + $p = & $this->position; |
|
| 97 | + $v = substr($v, 0, $p).$data.substr($v, $p += $l); |
|
| 98 | 98 | return $l; |
| 99 | 99 | } |
| 100 | 100 | |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | public function stream_seek(int $offset, int $whence = SEEK_SET): bool |
| 133 | 133 | { |
| 134 | 134 | $l = strlen($this->content); |
| 135 | - $p =& $this->position; |
|
| 135 | + $p = & $this->position; |
|
| 136 | 136 | switch ($whence) { |
| 137 | 137 | case SEEK_SET: |
| 138 | 138 | $newPos = $offset; |