Skip to content

Commit 8cd078e

Browse files
committed
BinaryStream: revert usage of typed properties
the main reason for this is a massive performance loss because of https://bugs.php.net/bug.php?id=81090, but the offset field also has some problems with JIT because of references - those problems won't be fixed until 8.0.7.
1 parent 79fe81f commit 8cd078e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/BinaryStream.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,12 @@
3131
use function substr;
3232

3333
class BinaryStream{
34+
//TODO: use typed properties when https://bugs.php.net/bug.php?id=81090 is fixed
3435

35-
protected int $offset;
36-
protected string $buffer;
36+
/** @var int */
37+
protected $offset;
38+
/** @var string */
39+
protected $buffer;
3740

3841
public function __construct(string $buffer = "", int $offset = 0){
3942
$this->buffer = $buffer;

0 commit comments

Comments
 (0)