Bug #73353 [NEW]: Discrepancy with opcache enabled/disabled
| From: | love at sickpeople dot se | Date: | Wed, 19 Oct 2016 19:19:31 +0000 |
| Subject: | Bug #73353 [NEW]: Discrepancy with opcache enabled/disabled | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-204926@lists.php.net to get a copy of this message | ||
From: love at sickpeople dot se
Operating system: Linux
PHP version: 7.1.0RC4
Package: opcache
Bug Type: Bug
Bug description:Discrepancy with opcache enabled/disabled
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 bug report at https://bugs.php.net/bug.php?id=73353&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=73353&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=73353&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=73353&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=73353&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=73353&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=73353&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=73353&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=73353&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=73353&r=support
Expected behavior: https://bugs.php.net/fix.php?id=73353&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=73353&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=73353&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=73353&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=73353&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=73353&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=73353&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=73353&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=73353&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=73353&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=73353&r=mysqlcfg