Bug #79317 [ReO->Csd]: opcache and setlocale issue
| From: | cmb@php.net | Date: | Wed, 03 Jun 2020 16:17:42 +0000 |
| Subject: | Bug #79317 [ReO->Csd]: opcache and setlocale issue | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-227300@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=79317&edit=1
ID: 79317
Updated by: cmb@php.net
Reported by: j dot arnold at qaamgo dot com
Summary: opcache and setlocale issue
-Status: Re-Opened
+Status: Closed
Type: Bug
Package: opcache
Operating System: OpenSuse 15.1
PHP Version: 7.4.3
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
As of PHP 8.0.0, float to string conversion no longer depends on
the locale[1], so this ticket is resolved.
[1] <https://wiki.php.net/rfc/locale_independent_float_to_string>
Previous Comments:
------------------------------------------------------------------------
[2020-02-29 22:44:44] cmb@php.net
Fair enough. However, I think this generally is a valid bug
report, so I'm re-opening.
------------------------------------------------------------------------
[2020-02-28 13:40:34] j dot arnold at qaamgo dot com
Thanks alot! Actually we missed the difference in optimization_level when comparing 7.3 with 7.4.
------------------------------------------------------------------------
[2020-02-28 13:19:10] cmb@php.net
This is due to opcode optimization, in this case OPcache produces:
ECHO string("Concatenated string: 0,5 invalidate cache for this class by changing something
here: v1<br />")
This also potentially happens with PHP 7.3; it depends on
opcache.optimization_level. Using
opcache.optimization_level=0x7FFEBF7F
(i.e. disabling bit 7) makes the code working as expected.
------------------------------------------------------------------------
[2020-02-28 12:55:01] j dot arnold at qaamgo dot com
> and how does that justify different behavior with or wuthout opcache?
exactly, also with opcache the first call is float is correct with a "," and the second
call is incorrect with a "."
------------------------------------------------------------------------
[2020-02-28 12:42:59] bugreports at gmail dot com
> This is due to the fact that displaying floats are locale aware
and how does that justify different behavior with or wuthout opcache?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=79317
--
Edit this bug report at https://bugs.php.net/bug.php?id=79317&edit=1