Bug #73789 [NEW]: Strange behavior of class constants in switch/case block
| From: | oliver dot hader at typo3 dot org | Date: | Mon, 19 Dec 2016 19:04:28 +0000 |
| Subject: | Bug #73789 [NEW]: Strange behavior of class constants in switch/case block | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-206134@lists.php.net to get a copy of this message | ||
From: oliver dot hader at typo3 dot org
Operating system: Mac OS
PHP version: 7.1.0
Package: CGI/CLI related
Bug Type: Bug
Bug description:Strange behavior of class constants in switch/case block
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 bug report at https://bugs.php.net/bug.php?id=73789&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=73789&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=73789&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=73789&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=73789&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=73789&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=73789&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=73789&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=73789&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=73789&r=support
Expected behavior: https://bugs.php.net/fix.php?id=73789&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=73789&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=73789&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=73789&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=73789&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=73789&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=73789&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=73789&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=73789&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=73789&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=73789&r=mysqlcfg