Re: [PHP-DEV] [RFC] Extend error control operator to suppress exceptions

2021-03-04 Thread Mike Schinkel
> On Mar 4, 2021, at 9:08 AM, G. P. B. wrote: > > Hello internals, > > This new RFC which I'm proposing is to extend the capability of the error > control operator @ to not just suppress diagnostic messages but also > exceptions. > It can currently be found on GitHub: [1] > https://github.com

[PHP-DEV] PHP 8.0.3 Released

2021-03-04 Thread Sara Golemon
The PHP development team announces the immediate availability of PHP 8.0.3. This is a bugfix release. For source downloads of PHP 8.0.3 please visit our downloads page: https://www.php.net/downloads Windows source and binaries can be found at https://windows.php.net/download The list of changes is

Re: [PHP-DEV] [RFC] Extend error control operator to suppress exceptions

2021-03-04 Thread G. P. B.
On Thu, 4 Mar 2021 at 21:53, Christoph M. Becker wrote: > On 04.03.2021 at 18:46, G. P. B. wrote: > > > On Thu, 4 Mar 2021 at 16:06, AllenJB wrote: > > > >> On a related note I dislike "documentation burden" as an argument > >> against improvements. I obviously understand "open source, volunteer

Re: [PHP-DEV] [RFC] Extend error control operator to suppress exceptions

2021-03-04 Thread Rowan Tommins
On 04/03/2021 14:08, G. P. B. wrote: This new RFC which I'm proposing is to extend the capability of the error control operator @ to not just suppress diagnostic messages but also exceptions. It can currently be found on GitHub: [1] https://github.com/Girgias/error-control-operator-exceptions-rfc

Re: [PHP-DEV] [RFC] Extend error control operator to suppress exceptions

2021-03-04 Thread Christoph M. Becker
On 04.03.2021 at 18:46, G. P. B. wrote: > On Thu, 4 Mar 2021 at 16:06, AllenJB wrote: > >> On a related note I dislike "documentation burden" as an argument >> against improvements. I obviously understand "open source, volunteers, >> translations, etc" but I've heard this a few times now as an ar

[PHP-DEV] Re: Recent changes to opcache cause crashes

2021-03-04 Thread Derick Rethans
On 4 March 2021 20:22:37 GMT, Dmitry Stogov wrote: >I can't reproduce this on Linux. > >[dmitry@tpl2 xdebug]$ php run-xdebug-tests.php -d opcache.enable=1 -d >opcache.enable_cli=1 -d opcache.optimization_level=-1 >tests/tracing/functrace_typed_properties.phpt > >... >PHP_VERSION : 8.1.0-dev >... >

[PHP-DEV] Re: Recent changes to opcache cause crashes

2021-03-04 Thread Dmitry Stogov
I can't reproduce this on Linux. [dmitry@tpl2 xdebug]$ php run-xdebug-tests.php -d opcache.enable=1 -d opcache.enable_cli=1 -d opcache.optimization_level=-1 tests/tracing/functrace_typed_properties.phpt ... PHP_VERSION : 8.1.0-dev ... PASS Test for function traces with typed properties [tests/tra

Re: [PHP-DEV] Don't compare zero exponentials in strings as equal

2021-03-04 Thread Rowan Tommins
On 04/03/2021 13:17, Nikita Popov wrote: A disadvantage of narrowing the definition in such a fashion is that it introduces a discrepancy with (float) casts. I believe these currently recognize the same values, with the exception that (float) discards trailing garbage. I don't think that's

[PHP-DEV] PHP 7.4.16 Released!

2021-03-04 Thread Derick Rethans
The PHP development team announces the immediate availability of PHP 7.4.16. This is a security bug fix release. All PHP 7.4 users are encouraged to upgrade to this version. For source downloads of PHP 7.4.16 please visit our downloads page. Windows binaries can be found on the PHP for Windows si

[PHP-DEV] Re: Recent changes to opcache cause crashes

2021-03-04 Thread Derick Rethans
Hi, It's not just my own build, see this one on OSX on Azure Pipelines (line 427): https://dev.azure.com/php-xdebug/Xdebug/_build/results?buildId=388&view=logs&j=fa4207ea-b23d-55f8-a438-8fcfe0ff1a84&t=a376e1dc-bcfe-530b-98ce-61c964f8af0f&l=425 Which is a build from scratch. And I've locally al

[PHP-DEV] Re: Recent changes to opcache cause crashes

2021-03-04 Thread Dmitry Stogov
I suppose, something is wrong with your build. This code works fine for me. Please, try full rebuild. Thanks. Dmitry. On Thu, Mar 4, 2021 at 9:00 PM Derick Rethans wrote: > Hi, > > turns out that this test fails even without Xdebug even loaded, so it's > not something on my side :-) > > Just ru

[PHP-DEV] Re: Recent changes to opcache cause crashes

2021-03-04 Thread Derick Rethans
Hi, turns out that this test fails even without Xdebug even loaded, so it's not something on my side :-) Just run it as: wget https://derickrethans.nl/files/dump/xdebug_var_dump_typed_properties-text.php.txt -O xdebug_var_dump_typed_properties-text.php php -n -dzend_extension=opcache -d "opca

Re: [PHP-DEV] [RFC] Deprecate implicit non-integer-compatible float to int conversions

2021-03-04 Thread G. P. B.
On Thu, 4 Mar 2021 at 13:23, Andreas Leathley wrote: > On 04.03.21 14:07, G. P. B. wrote: > > This new version of the RFC can be found on the wiki: [2] > > https://wiki.php.net/rfc/implicit-float-int-deprecate > > I like the RFC, but I think the diagnostic messages will be hard to > understand wh

Re: [PHP-DEV] [RFC] Extend error control operator to suppress exceptions

2021-03-04 Thread G. P. B.
On Thu, 4 Mar 2021 at 16:06, AllenJB wrote: > > On 04/03/2021 14:08, G. P. B. wrote: > > Hello internals, > > > > This new RFC which I'm proposing is to extend the capability of the error > > control operator @ to not just suppress diagnostic messages but also > > exceptions. > > It can currently

Re: [PHP-DEV] [RFC] New in initializers

2021-03-04 Thread Larry Garfield
On Thu, Mar 4, 2021, at 7:53 AM, Nikita Popov wrote: > I've added a section that describes reflection methods. It works exactly as > you say. > > There is one interesting case though: How should > ReflectionObject::newInstanceWithoutConstructor() work? In the current > implementation, it will sti

Re: [PHP-DEV] [RFC] Extend error control operator to suppress exceptions

2021-03-04 Thread AllenJB
On 04/03/2021 14:08, G. P. B. wrote: Hello internals, This new RFC which I'm proposing is to extend the capability of the error control operator @ to not just suppress diagnostic messages but also exceptions. It can currently be found on GitHub: [1] https://github.com/Girgias/error-control-ope

Re: [PHP-DEV] [RFC] New in initializers

2021-03-04 Thread Nikita Popov
On Thu, Mar 4, 2021 at 4:26 PM Gabriel O wrote: > > On Wed, 3 Mar 2021 at 16:04, Nikita Popov wrote: > >> Hi internals, >> >> I would like to propose allowing the use of "new" inside various >> initializer expressions: https://wiki.php.net/rfc/new_in_initializers >> >> In particular, this allows

Re: [PHP-DEV] [RFC] New in initializers

2021-03-04 Thread Gabriel O
On Wed, 3 Mar 2021 at 16:04, Nikita Popov wrote: > Hi internals, > > I would like to propose allowing the use of "new" inside various > initializer expressions: https://wiki.php.net/rfc/new_in_initializers > > In particular, this allows specifying object default values for properties > and parame

Re: [PHP-DEV] [RFC] New in initializers

2021-03-04 Thread Nikita Popov
On Wed, Mar 3, 2021 at 7:04 PM Alexandru Pătrănescu wrote: > > On Wed, Mar 3, 2021 at 5:49 PM Nikita Popov wrote: > >> On Wed, Mar 3, 2021 at 4:28 PM Alexandru Pătrănescu >> wrote: >> >>> Hi, >>> >>> This looks very nice and I'm interested in further steps where not only >>> new can be used :).

[PHP-DEV] [RFC] Extend error control operator to suppress exceptions

2021-03-04 Thread G. P. B.
Hello internals, This new RFC which I'm proposing is to extend the capability of the error control operator @ to not just suppress diagnostic messages but also exceptions. It can currently be found on GitHub: [1] https://github.com/Girgias/error-control-operator-exceptions-rfc The main motivation

Re: [PHP-DEV] [RFC] New in initializers

2021-03-04 Thread Nikita Popov
On Thu, Mar 4, 2021 at 6:21 AM Michał Marcin Brzuchalski < michal.brzuchal...@gmail.com> wrote: > Hi Nikita, > > śr., 3 mar 2021, 16:04 użytkownik Nikita Popov > napisał: > >> Hi internals, >> >> I would like to propose allowing the use of "new" inside various >> initializer expressions: https://

[PHP-DEV] Re: Recent changes to opcache cause crashes when loaded with Xdebug

2021-03-04 Thread Dmitry Stogov
We already made few significant changes in PHP-8.1. e.g. most classes and methods are immutable. It's not allowed to change them (this is the same as before, but now almost all of them are immutable). Use opcache.protect_memory=1 to catch potentially wrong modification. >From the quick look, I don

Re: [PHP-DEV] [RFC] Deprecate implicit non-integer-compatible float to int conversions

2021-03-04 Thread Andreas Leathley
On 04.03.21 14:07, G. P. B. wrote: This new version of the RFC can be found on the wiki: [2] https://wiki.php.net/rfc/implicit-float-int-deprecate I like the RFC, but I think the diagnostic messages will be hard to understand when they come up in real scripts, especially because they can be pla

Re: [PHP-DEV] Don't compare zero exponentials in strings as equal

2021-03-04 Thread Nikita Popov
On Thu, Mar 4, 2021 at 1:03 PM Rowan Tommins wrote: > On 04/03/2021 10:54, Nikita Popov wrote: > > The main one that comes to mind is something like '0' == '0.0'. However, > > the real problem is something else: Comparison behavior doesn't affect > just > > == and !=, but also < and >. And I can

[PHP-DEV] Re: timelib inefficiency

2021-03-04 Thread Dmitry Stogov
hi, On Thu, Mar 4, 2021 at 3:30 PM Derick Rethans wrote: > Hi, > > I saw the PRs coming in, I'll reply inline: > > On Thu, 4 Mar 2021, Dmitry Stogov wrote: > > > > https://github.com/php/php-src/commit/b4e9b1846376f562e27a13572a137ec584c13f58 > > As Nikita already commented, this now seems to in

[PHP-DEV] [RFC] Deprecate implicit non-integer-compatible float to int conversions

2021-03-04 Thread G. P. B.
Hello internals, This is a follow-up on the previous thread [1] about my RFC tackling implicit float to int conversion. It is now slightly larger in scope as it also pertains to what I call "non compatible integer floating numbers". This new version of the RFC can be found on the wiki: [2] https:

[PHP-DEV] Recent changes to opcache cause crashes when loaded with Xdebug

2021-03-04 Thread Derick Rethans
Hi, I've been doing some work on making Xdebug run with PHP 8.1 (master) again, and after my fixes (https://github.com/xdebug/xdebug/pull/728/files) I am still running into a crash (or rather, assert, in opcache): php: /home/derick/dev/php/php-src.git/ext/opcache/zend_persist.c:327: zend_acce

[PHP-DEV] Re: timelib inefficiency

2021-03-04 Thread Derick Rethans
Hi, I saw the PRs coming in, I'll reply inline: On Thu, 4 Mar 2021, Dmitry Stogov wrote: > https://github.com/php/php-src/commit/b4e9b1846376f562e27a13572a137ec584c13f58 As Nikita already commented, this now seems to introduce flakeyness into tests. > And created 3 pull request for timelib: >

Re: [PHP-DEV] Don't compare zero exponentials in strings as equal

2021-03-04 Thread Rowan Tommins
On 04/03/2021 10:54, Nikita Popov wrote: The main one that comes to mind is something like '0' == '0.0'. However, the real problem is something else: Comparison behavior doesn't affect just == and !=, but also < and >. And I can see how people would want '2' < '10' to be true (numeric comparison)

Re: [PHP-DEV] Don't compare zero exponentials in strings as equal

2021-03-04 Thread Kamil Tekiela
I actually do a lot of lexicographical comparison with ISO8601 date strings. I also have numerical string comparisons, but the truth is I didn't think they would be cast to integers so that is a potential bug in my code. When I use < on strings I expect that they will both compare as strings. In ot

Re: [PHP-DEV] Don't compare zero exponentials in strings as equal

2021-03-04 Thread Nikita Popov
On Thu, Mar 4, 2021 at 11:54 AM Nikita Popov wrote: > On Thu, Mar 4, 2021 at 10:54 AM Christian Schneider > wrote: > >> Am 04.03.2021 um 01:37 schrieb Ben Ramsey : >> > On Mar 3, 2021, at 14:25, Kamil Tekiela wrote: >> >> >> >> when both are strings then chances are that this is an error. >> >

Re: [PHP-DEV] Don't compare zero exponentials in strings as equal

2021-03-04 Thread Nikita Popov
On Thu, Mar 4, 2021 at 10:54 AM Christian Schneider wrote: > Am 04.03.2021 um 01:37 schrieb Ben Ramsey : > > On Mar 3, 2021, at 14:25, Kamil Tekiela wrote: > >> > >> when both are strings then chances are that this is an error. > > > > Except when comparing two values from sources known to provi

Re: [PHP-DEV] Don't compare zero exponentials in strings as equal

2021-03-04 Thread Christian Schneider
Am 04.03.2021 um 01:37 schrieb Ben Ramsey : > On Mar 3, 2021, at 14:25, Kamil Tekiela wrote: >> >> when both are strings then chances are that this is an error. > > Except when comparing two values from sources known to provide numbers as > strings, such as form input and database results. :-)

[PHP-DEV] Re: timelib inefficiency

2021-03-04 Thread Dmitry Stogov
Hi Derick, I spent some time looking in the timelib implementation caused slowness in the Symphony Demo app (https://github.com/symfony/demo) I committed one patch into ext/date: https://github.com/php/php-src/commit/b4e9b1846376f562e27a13572a137ec584c13f58 And created 3 pull request for timeli

Re: [PHP-DEV] Don't compare zero exponentials in strings as equal

2021-03-04 Thread Rowan Tommins
On 04/03/2021 00:37, Ben Ramsey wrote: On Mar 3, 2021, at 14:25, Kamil Tekiela wrote: when both are strings then chances are that this is an error. Except when comparing two values from sources known to provide numbers as strings, such as form input and database results. :-) The juggling