|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-11-05 01:09 UTC] love at sickpeople dot se
-Status: Open
+Status: Closed
[2016-11-05 01:09 UTC] love at sickpeople dot se
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 18:00:01 2025 UTC |
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.