Bug #78961 [Com]: switch+opcache

From: Date: Sat, 14 Dec 2019 04:23:03 +0000
Subject: Bug #78961 [Com]: switch+opcache
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-224291@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78961&edit=1 ID: 78961 Comment by: bugreports at gmail dot com Reported by: szargv at qq dot com Summary: switch+opcache Status: Open Type: Bug Package: opcache Operating System: CentOS 7 64Bit PHP Version: 7.4.0 Block user comment: N Private report: N New Comment: confirmed alias php-opcache='/usr/bin/php -d "zend_extension=opcache.so" -d "opcache.enable_cli=1"' php test.php int(3) php-opcache test.php Notice: Undefined index: nsno in test.php on line 7 NULL Previous Comments: ------------------------------------------------------------------------ [2019-12-14 04:13:39] szargv at qq dot com Description: ------------ PHP 7.4 + CentOS 7 in CLI mode when opcache.enable_cli=1 it shows null when opcache.enable_cli=0 it shows 3 my email is szargv@qq.com Test script: --------------- <?php switch (1){ case 1: $GLOBALS = array(); $GLOBALS['td'] = array(); $GLOBALS['td']['nsno'] = 3; var_dump($GLOBALS['td']['nsno']); break; } Expected result: ---------------- in CLI mode when opcache.enable_cli=1 it shows null when opcache.enable_cli=0 it shows 3 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=78961&edit=1

« previous php.bugs (#224291) next »