Skip to content

Commit 19065de

Browse files
Add frameless functions
1 parent 617ba06 commit 19065de

File tree

2 files changed

+28
-8
lines changed

2 files changed

+28
-8
lines changed

profiling/tests/correctness/allocations.json

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,22 @@
77
"stack-content": [
88
{
99
"regular_expression": "<?php;main;a;standard\\|str_repeat$",
10-
"percent": 66,
11-
"value": 1248240336,
10+
"percent": 33,
1211
"error_margin": 5
1312
},
1413
{
15-
"regular_expression": "<?php;main;b;standard\\|str_repeat$",
14+
"regular_expression": "<?php;main;a;standard\\|str_replace$",
1615
"percent": 33,
17-
"value": 613620616,
16+
"error_margin": 5
17+
},
18+
{
19+
"regular_expression": "<?php;main;b;standard\\|str_repeat$",
20+
"percent": 16,
21+
"error_margin": 5
22+
},
23+
{
24+
"regular_expression": "<?php;main;b;standard\\|str_replace$",
25+
"percent": 16,
1826
"error_margin": 5
1927
}
2028
]
@@ -24,12 +32,22 @@
2432
"stack-content": [
2533
{
2634
"regular_expression": "<?php;main;a;standard\\|str_repeat$",
27-
"percent": 50,
35+
"percent": 25,
36+
"error_margin": 5
37+
},
38+
{
39+
"regular_expression": "<?php;main;a;standard\\|str_replace$",
40+
"percent": 25,
2841
"error_margin": 5
2942
},
3043
{
3144
"regular_expression": "<?php;main;b;standard\\|str_repeat$",
32-
"percent": 50,
45+
"percent": 25,
46+
"error_margin": 5
47+
},
48+
{
49+
"regular_expression": "<?php;main;b;standard\\|str_replace$",
50+
"percent": 25,
3351
"error_margin": 5
3452
}
3553
]

profiling/tests/correctness/allocations.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22

33
function a()
44
{
5-
str_repeat("a", 1024 * 120_000);
5+
$a = str_repeat("a", 1024 * 12_000);
6+
str_replace('a', 'b', $a);
67
}
78

89
function b()
910
{
10-
str_repeat("a", 1024 * 60_000);
11+
$a = str_repeat("a", 1024 * 6_000);
12+
str_replace('a', 'b', $a);
1113
}
1214

1315
function main()

0 commit comments

Comments
 (0)