FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
igbinary/benchmark/unserialize-scalararray.b.php at 3.2.16 · igbinary/igbinary · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
igbinary
/
igbinary
Public
forked from
phadej/igbinary
Notifications
You must be signed in to change notification settings
Fork
76
Star
786
Code
Issues
20
Pull requests
1
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
igbinary
/
benchmark
/
unserialize-scalararray.b.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
37 lines (32 loc) · 801 Bytes
Breadcrumbs
igbinary
/
benchmark
/
unserialize-scalararray.b.php
Copy path
File metadata and controls
37 lines (32 loc) · 801 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
<?php
// Description: Unserialize scalar array
require_once
'
bench.php
'
;
call_user_func
(
function
() {
$
b
=
new
Bench
(
'
unserialize-scalar-array
'
);
$
array
=
array
();
for
(
$
i
=
0
;
$
i
<
1000
;
$
i
++) {
switch
(
$
i
%
4
) {
case
0
:
$
array
[] =
"
da string
"
.
$
i
;
break
;
case
1
:
$
array
[] =
1.31
*
$
i
;
break
;
case
2
:
$
array
[] =
rand
(
0
,
PHP_INT_MAX
);
break
;
case
3
:
$
array
[] = (
bool
)(
$
i
&
1
);
break
;
}
}
$
ser
=
igbinary_serialize
(
$
array
);
for
(
$
i
=
0
;
$
i
<
40
;
$
i
++) {
$
b
->
start
();
for
(
$
j
=
0
;
$
j
<
5800
;
$
j
++) {
$
array
=
igbinary_unserialize
(
$
ser
);
}
$
b
->
stop
(
$
j
);
$
b
->
write
();
}
});
Back
|
FazBrowse Home
|
New Git URL