Bug #73353 [Opn->Csd]: Discrepancy with opcache enabled/disabled

From: Date: Sat, 05 Nov 2016 01:09:54 +0000
Subject: Bug #73353 [Opn->Csd]: Discrepancy with opcache enabled/disabled
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-205192@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73353&edit=1 ID: 73353 User updated by: love at sickpeople dot se Reported by: love at sickpeople dot se Summary: Discrepancy with opcache enabled/disabled -Status: Open +Status: Closed Type: Bug Package: opcache Operating System: Linux PHP Version: 7.1.0RC4 Block user comment: N Private report: N New Comment: This is not a new problem. It is fixed by setting the INI opcache.dups_fix. Previous Comments: ------------------------------------------------------------------------ [2016-10-19 19:19:28] love at sickpeople dot se Description: ------------ With opcache enabled PHP fails with "Cannot declare class Foo, because the name is already in use". If opcache is disabled, the code is working as expected (no error). I have no .ini files except one file with "opcache.enable = 1", in conf.d Test script: --------------- /* File 1 */ ini_set ('display_errors', true); var_dump (opcache_is_script_cached (__FILE__)); include "foo.php"; include "foo.php"; /* File "foo.php" */ if (class_exists ('Foo', false)) { return; } class Foo {} Expected result: ---------------- The second include of foo.php should return before declaring Foo again. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=73353&edit=1

« previous php.bugs (#205192) next »