Bug #78015 [Opn->Ver]: Fatal error when Opcache enabled on PHP 7.3.5 under Linux
| From: | nikic@php.net | Date: | Wed, 15 May 2019 11:15:14 +0000 |
| Subject: | Bug #78015 [Opn->Ver]: Fatal error when Opcache enabled on PHP 7.3.5 under Linux | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-220859@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=78015&edit=1
ID: 78015
Updated by: nikic@php.net
Reported by: andrejs dot verza at gmail dot com
Summary: Fatal error when Opcache enabled on PHP 7.3.5 under
Linux
-Status: Open
+Status: Verified
Type: Bug
Package: opcache
Operating System: Ubuntu 18.04
PHP Version: 7.3.5
Block user comment: N
Private report: N
New Comment:
The "require" seems to be necessary to reproduce this, for some reason.
Previous Comments:
------------------------------------------------------------------------
[2019-05-15 11:10:05] andrejs dot verza at gmail dot com
Description:
------------
PHP 7.3.5 throws a "Fatal error: Uncaught Error: Unsupported operand types ..." when
opcache is enabled in php.ini on Ubuntu Linux 16.04, 18.04, 19.04.
Notes:
- The error is only thrown on a first http request after server started or restarted (the following
requests work as expected).
- The error is thrown on Apache web server as well as on a PHP built-in web server.
- The error is not present on Windows.
Workaround:
Set opcache.optimization_level=0x7FFFBFDF in php.ini (instead of the default value 0x7FFFBFFF).
Test script:
---------------
index.php:
<?php require_once 'simple.php'; ?>
simple.php:
<?php
$x = 1;
function f() {
global $x;
$a = ['b' => [$x], 'c' => [$x]];
$d = $a['b'] + $a['c'];
}
Expected result:
----------------
Empty output, no PHP errors.
Actual result:
--------------
Fatal error: Uncaught Error: Unsupported operand types in /var/www/html/index.php:1 Stack trace: #0
{main} thrown in /var/www/html/index.php on line 1
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=78015&edit=1