Bug #78240 [Fbk->NoF]: Include/require doesn't seem to preload
| From: | php-bugs at lists dot php dot net | Date: | Sun, 14 Jul 2019 04:22:05 +0000 |
| Subject: | Bug #78240 [Fbk->NoF]: Include/require doesn't seem to preload | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-221764@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=78240&edit=1
ID: 78240
Updated by: php-bugs@lists.php.net
Reported by: brent at spatie dot be
Summary: Include/require doesn't seem to preload
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: opcache
Operating System: macOS Mojave
PHP Version: 7.4.0alpha2
Private report: N
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2019-07-05 11:52:11] nikic@php.net
I can't reproduce this. Using require_once I get 859 preloaded classes. Using require I get a
fatal error due to a redeclared class.
------------------------------------------------------------------------
[2019-07-02 13:09:36] brent at spatie dot be
Description:
------------
The
opcache.preload documentation
(https://php.net/manual/en/opcache.configuration.php#ini.opcache.preload) states:
"[â¦] either by includeing them or by using the opcache_compile_file() function"
However, using include, include_once, require or
require_once doesn't seem to actually preload files.
Test script:
---------------
The source code: https://github.com/brendt/laravel-preload
The preload file: https://github.com/brendt/laravel-preload/blob/master/preload.php#L88
Tested by dumping opcache_get_status()['scripts'] right after a server
restart: https://github.com/brendt/laravel-preload/blob/master/routes/web.php#L16
Using opcache_compile_file(), 39 files are available, while only 16 files are available
when using require or include (these are all non-class files)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=78240&edit=1