Re: [PHP-DEV] Inconsistent float to string vs. string to floatcasting

2019-01-02 Thread Nikita Popov
On Wed, Jan 2, 2019 at 12:30 AM Stanislav Malyshev wrote: > Hi! > > > So yes, (string)0.3 should return 0.3 in any locale. > > If we designed it now, without any doubt. But since we have 20 years of > history behind... I'm not so sure. > > > Finally, I don't think that the global locale is the

[PHP-DEV] short_open_tag default

2019-01-02 Thread Nikita Popov
Hi internals, As mentioned in https://bugs.php.net/bug.php?id=77378, we currently have inconsistent defaults for the short_open_tag ini option. While this option is disabled both in php.ini-production and php.ini-development, the default (without ini) is enabled, unless --disable-short-open-tag

[PHP-DEV] Re: Hello everybody

2019-01-02 Thread Christoph M. Becker
On 01.01.2019 at 23:06, Legale Legage wrote: > Hello my name is Ruslan, login on wiki.php.net is rumi. I would like to > take a part in > php development. Please give me write access to create an RFC. I have granted you RFC karma. -- Christoph M. Becker -- PHP Internals - PHP Runtime

Re: [PHP-DEV] Inconsistent float to string vs. string to floatcasting

2019-01-02 Thread Lauri Kenttä
On 2019-01-02 19:22, Zeev Suraski wrote: 1. I'm not sure what you mean "not many people use this"? People don't convert floats to strings? People don't format their floats using setlocale + echo. People use things like sprintf and number_format to get the right number of decimals, and many

Re: [PHP-DEV] Inconsistent float to string vs. string to floatcasting

2019-01-02 Thread Zeev Suraski
On Wed, Jan 2, 2019 at 6:11 PM Nikita Popov wrote: > On Wed, Jan 2, 2019 at 12:33 PM Zeev Suraski wrote: > I don't expect this to be a particularly large issue for two reasons: > > 1. Not many people use this. I'm sure that there *are* people who use this > and use it intentionally, but I've

Re: [PHP-DEV] Inconsistent float to string vs. string to floatcasting

2019-01-02 Thread Nikita Popov
On Wed, Jan 2, 2019 at 6:22 PM Zeev Suraski wrote: > > > On Wed, Jan 2, 2019 at 6:11 PM Nikita Popov wrote: > >> On Wed, Jan 2, 2019 at 12:33 PM Zeev Suraski wrote: >> I don't expect this to be a particularly large issue for two reasons: >> >> 1. Not many people use this. I'm sure that there

Re: [PHP-DEV] Inconsistent float to string vs. string to floatcasting

2019-01-02 Thread Stanislav Malyshev
Hi! > 2. Even if somebody is using this functionality, the only thing that's > going to happen is that their number display switches from 1,5 to 1.5. > That's a minor UX regression, not a broken application. It's something > that will have to be fixed, but it's also not critical, and for a legacy

Re: [PHP-DEV] Inconsistent float to string vs. string to floatcasting

2019-01-02 Thread Lester Caine
On 01/01/2019 23:29, Stanislav Malyshev wrote: Finally, I don't think that the global locale is the real problem for PHP. Rather it's PHP locale handling and the fact that setlocale() works per process (and not per thread). When PHP starts up, no locale That's part of locale being global.

[PHP-DEV] RFC mb_str_split

2019-01-02 Thread Legale Legage
Hello, internals. I would like to introduce you RFC mb_str_split ( https://wiki.php.net/rfc/mb_str_split). mb_str_split it's just a multibyte analog of the native str_split. Let's discuss.

Re: [PHP-DEV] Inconsistent float to string vs. string to floatcasting

2019-01-02 Thread Zeev Suraski
On Wed, Jan 2, 2019 at 11:26 AM Nikita Popov wrote: > On Wed, Jan 2, 2019 at 12:30 AM Stanislav Malyshev > wrote: > > We have a rather hard policy against ini options that influence language > behavior. Locale-dependent language behavior is essentially the same issue, > just worse due to the

Re: [PHP-DEV] Inconsistent float to string vs. string to floatcasting

2019-01-02 Thread Zeev Suraski
On Wed, 2 Jan 2019 at 17:12 Christoph M. Becker wrote: > On 02.01.2019 at 12:32, Zeev Suraski wrote: > > > Unless I'm missing something, changing this behavior would require a > full, > > line-by-line audit of the code - with no Search & Replace patterns that > can > > find these instances in

Re: [PHP-DEV] Inconsistent float to string vs. string to floatcasting

2019-01-02 Thread Nikita Popov
On Wed, Jan 2, 2019 at 12:33 PM Zeev Suraski wrote: > > > On Wed, Jan 2, 2019 at 11:26 AM Nikita Popov wrote: > >> On Wed, Jan 2, 2019 at 12:30 AM Stanislav Malyshev >> wrote: >> >> We have a rather hard policy against ini options that influence language >> behavior. Locale-dependent language

[PHP-DEV] Re: Inconsistent float to string vs. string to float casting

2019-01-02 Thread Umberto Salsi
cmbecke...@gmx.de ("Christoph M. Becker") wrote: > [...] I tend to prefer the non-locale aware behavior, i.e. float to > string conversion should always produce a decimal *point*. Users still > can explicitly use number_format() or NumberFormatter if they wish. We all agree that the basic

Re: [PHP-DEV] Inconsistent float to string vs. string to floatcasting

2019-01-02 Thread Christoph M. Becker
On 02.01.2019 at 12:32, Zeev Suraski wrote: > On Wed, Jan 2, 2019 at 11:26 AM Nikita Popov wrote: > >> On Wed, Jan 2, 2019 at 12:30 AM Stanislav Malyshev >> wrote: >> >> We have a rather hard policy against ini options that influence language >> behavior. Locale-dependent language behavior is