Bug #66338 [NEW]: Optimization binding of class constants is not safely opcacheable
| From: | Terry at ellisons dot org dot uk | Date: | Mon, 23 Dec 2013 00:32:08 +0000 |
| Subject: | Bug #66338 [NEW]: Optimization binding of class constants is not safely opcacheable | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-183438@lists.php.net to get a copy of this message | ||
From: Terry at ellisons dot org dot uk
Operating system: N/A
PHP version: master-Git-2013-12-23 (Git)
Package: opcache
Bug Type: Bug
Bug description:Optimization binding of class constants is not safely opcacheable
Description:
------------
The OPcache optimizer cannot safely bind class constants at compile
time. This is because the class itself is not bound until execution --
that is when the script is loaded and not when prepared. This can open
up all sorts of pitfalls if the application can have variants of the
same class. The attached PHPT gives a trite example, but this is
entirely allowable under PHP 5.x and therefore trying to do this is not
B/C.
Test script:
---------------
See PHPT at https://gist.github.com/TerryE/8090105
--
Edit bug report at https://bugs.php.net/bug.php?id=66338&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=66338&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=66338&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=66338&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=66338&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=66338&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=66338&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=66338&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=66338&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=66338&r=support
Expected behavior: https://bugs.php.net/fix.php?id=66338&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=66338&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=66338&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=66338&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=66338&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=66338&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=66338&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=66338&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=66338&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=66338&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=66338&r=mysqlcfg