Bug #73789 [Opn->Ana]: Strange behavior of class constants in switch/case block

From: Date: Tue, 20 Dec 2016 11:51:12 +0000
Subject: Bug #73789 [Opn->Ana]: Strange behavior of class constants in switch/case block
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-206150@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73789&edit=1 ID: 73789 Updated by: laruence@php.net Reported by: oliver dot hader at typo3 dot org Summary: Strange behavior of class constants in switch/case block -Status: Open +Status: Analyzed Type: Bug Package: CGI/CLI related Operating System: Mac OS PHP Version: 7.1.0 Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2016-12-20 11:45:42] laruence@php.net could you please verify if following path works? https://gist.github.com/laruence/54ad3436af0f46aac8f8009f25558d49 ------------------------------------------------------------------------ [2016-12-20 11:32:38] cmb@php.net > The behavior occurs only in PHP 7.1.0 CGI context, using the CLI > wrapper everything works as expected. Is this perhaps on OPcache issue? ------------------------------------------------------------------------ [2016-12-19 19:12:48] oliver dot hader at typo3 dot org I forgot to mention, that I could reproduce this behavior in PHP 7.1-RC5 as well. ------------------------------------------------------------------------ [2016-12-19 19:04:21] oliver dot hader at typo3 dot org Description: ------------ The behavior occurs only in PHP 7.1.0 CGI context, using the CLI wrapper everything works as expected. Besides that, the scenario seems to at least require a switch/case block, several class constants and constant look-ups and multiple return types. Find further down the minimal source code that is required to reproduce this issue. Parts of the code were taken from the TYPO3 CMS project, where this issue has been identified and worked around in a specific patch (https://review.typo3.org/#/c/50998/). On executing the test script, the PHP process hangs and consumes a lot of CPU. Test script: --------------- see https://gist.github.com/ohader/ed0093e95f7f88714903425021f2b426 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=73789&edit=1

« previous php.bugs (#206150) next »