Bug #78015 [Ver->Csd]: Incorrect evaluation of expressions involving partials array in SCCP

From: Date: Wed, 15 May 2019 12:37:07 +0000
Subject: Bug #78015 [Ver->Csd]: Incorrect evaluation of expressions involving partials array in SCCP
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-220860@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: Incorrect evaluation of expressions involving partials array in SCCP -Status: Verified +Status: Closed Type: Bug Package: opcache Operating System: Ubuntu 18.04 PHP Version: 7.3.5 Assigned To: nikic Block user comment: N Private report: N New Comment: Automatic comment on behalf of nikita.ppv@gmail.com Revision: http://git.php.net/?p=php-src.git;a=commit;h=9d76fbd0c4ae71df2a476ce7529728fa19b37549 Log: Fixed bug #78015 Previous Comments: ------------------------------------------------------------------------ [2019-05-15 11:15:14] nikic@php.net The "require" seems to be necessary to reproduce this, for some reason. ------------------------------------------------------------------------ [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

« previous php.bugs (#220860) next »