FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
ext-buffer/buffer.php at master · phpinnacle/ext-buffer · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
phpinnacle
/
ext-buffer
Public
Notifications
You must be signed in to change notification settings
Fork
2
Star
10
Code
Issues
1
Pull requests
1
Actions
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
ext-buffer
/
buffer.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
39 lines (31 loc) · 795 Bytes
Breadcrumbs
ext-buffer
/
buffer.php
Copy path
File metadata and controls
39 lines (31 loc) · 795 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
/**
* This file is part of PHPinnacle/Buffer.
*
* (c) PHPinnacle Team <dev@phpinnacle.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use
PHPinnacle
\
Buffer
\
ByteBuffer
;
$
buffer
=
new
ByteBuffer
;
$
buffer
->
append
(
'
abcd
'
);
$
buffer
->
read
(
4
);
$
buffer
->
append
(
new
ByteBuffer
(
'
zz
'
));
$
buffer
->
consume
(
6
);
$
buffer
->
appendUint8
(
1
);
$
buffer
->
appendInt8
(
1
);
$
slice
=
$
buffer
->
slice
(
2
);
$
slice
->
readUint8
();
$
slice
->
readInt8
(
1
);
$
buffer
->
consumeUint8
();
$
buffer
->
consumeInt8
();
$
buffer
->
appendUint16
(
1
);
$
buffer
->
appendInt16
(
1
);
$
shift
=
$
buffer
->
shift
(
4
);
$
shift
->
consumeUint16
();
$
shift
->
consumeInt16
();
$
clone
=
clone
$
buffer
;
$
clone
->
appendUint32
(
1
);
echo
$
buffer
->
flush
();
echo
(
string
)
$
clone
;
Back
|
FazBrowse Home
|
New Git URL