0.3.0
Pre-release
Pre-release
⚠️ This extension is still experimental. DO NOT use this in production.
Changes since 0.2.x
API changes
ByteBuffer
now has separate offsets for read and write. This allows it to more closely mimic the behaviour ofBinaryStream
, which implicitly has separate offsets (BinaryStream->getOffset()
is only used for reading; writing just appends to the internal string)- Added
ByteBuffer->getReadOffset()
- Added
ByteBuffer->setReadOffset()
- Added
ByteBuffer->getWriteOffset()
- Added
ByteBuffer->setWriteOffset()
- Removed
ByteBuffer->getOffset()
- Removed
ByteBuffer->setOffset()
- Removed
ByteBuffer->rewind()
(usesetReadOffset(0)
orsetWriteOffset(0)
depending on your use case)
- Added
- Renamed
ByteBuffer->getReserved()
->ByteBuffer->getReservedLength()
- Added
ByteBuffer->getUsedLength()
- Added
ByteBuffer->clear()
Other changes
- Now tested on PHP 8.3
- All non-macro-generated API methods are now in an internal
BaseByteBuffer
class, to allow as much of the arginfo as possible to be generated by PHP'sgen-stub.php
.ByteBuffer
extendsBaseByteBuffer
and there is no observable change toByteBuffer
API and behaviour from this change.