Bug #78240 [NEW]: Include/require doesn't seem to preload

From: Date: Tue, 02 Jul 2019 13:09:36 +0000
Subject: Bug #78240 [NEW]: Include/require doesn't seem to preload
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-221584@lists.php.net to get a copy of this message
From: brent at spatie dot be Operating system: macOS Mojave PHP version: 7.4.0alpha2 Package: opcache Bug Type: Bug Bug description:Include/require doesn't seem to preload 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 bug report at https://bugs.php.net/bug.php?id=78240&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=78240&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=78240&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=78240&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=78240&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=78240&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=78240&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=78240&r=needscript Try newer version: https://bugs.php.net/fix.php?id=78240&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=78240&r=support Expected behavior: https://bugs.php.net/fix.php?id=78240&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=78240&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=78240&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=78240&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=78240&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=78240&r=dst IIS Stability: https://bugs.php.net/fix.php?id=78240&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=78240&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=78240&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=78240&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=78240&r=mysqlcfg

« previous php.bugs (#221584) next »