Skip to content

Commit dd23935

Browse files
committed
Add preload
1 parent 36d2c86 commit dd23935

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

.phpbenchmarks/php/7.4/composer.lock

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.phpbenchmarks/php/7.4/preload.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,13 @@
11
<?php
2+
3+
declare(strict_types=1);
4+
5+
opcache_compile_file(__DIR__ . '/../../../public/index.php');
6+
7+
// If somebody find why when I add any file in src/ into preload,
8+
// PHP-FPM restart whithout error but i have a white page or a 502 with only this log:
9+
// WARNING: [pool www] child 2854 exited on signal 6 (SIGABRT - core dumped) after 0.154003 seconds from start
10+
// I think it's because of the size of the preloaded files
11+
//opcache_compile_file(__DIR__ . '/../../../src/blocks.php');
12+
//opcache_compile_file(__DIR__ . '/../../../src/functions.php');
13+
//opcache_compile_file(__DIR__ . '/../../../src/macros.php');

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"license": "proprietary",
44
"type": "project",
55
"require": {
6-
"php": "7.4.2"
6+
"php": "7.4.2",
7+
"ext-zend-opcache": "*"
78
}
89
}

0 commit comments

Comments
 (0)