php-byte-buffer
php-byte-buffer copied to clipboard
Implementing Java's ByteBuffer.allocate
I am porting a Java program which utilises a UTF-8 string conversion to a byte array. It then allocates a byte buffer with a fixed value of 16, before writing each UTF-8 integer representation into the buffer.
How could I reimplement this using this library? It seems the function call to allocate() is missing...
@Brhsoftco You don't need to allocate memory in PHP. This will be done automatically.