Re: [PHP-DEV] DateTimeZone silently falls back to UTC when providing seconds

2021-09-13 Thread Hans Henrik Bergan
>What use-case does that serve? if some country want to change their timezone for whatever reason, to some timezone that didn't exist previously, could happen at any time really On Mon, 13 Sept 2021 at 13:32, Hans Henrik Bergan wrote: > > What use-case does that serve? > > if some country want

Re: [PHP-DEV] DateTimeZone silently falls back to UTC when providing seconds

2021-09-13 Thread Andreas Heigl
Hey On 13.09.21 13:32, Hans Henrik Bergan wrote: What use-case does that serve? if some country want to change their timezone for whatever reason, to some timezone that didn't exist previously, could happen at any time really I'm well aware that that could happen at any time really. And I'm

Re: [PHP-DEV] DateTimeZone silently falls back to UTC when providing seconds

2021-09-13 Thread Pierre
Le 13/09/2021 à 14:06, Andreas Heigl a écrit : Hey What use-case does it serve to allow offsets that are not reflected in the TZDB? Yes there are use cases: * Your TZDB is obsolete, your hardware and OS is obsolete, but the prod is still running (it happens more than you think). * You

Re: [PHP-DEV] Class static initialization block

2021-09-13 Thread Mike Schinkel
> On Sep 11, 2021, at 7:35 PM, Marco Pivetta wrote: > > On Sun, 12 Sep 2021, 01:28 David Rodrigues, wrote: > >> Hello! >> >> I would like to suggest a feature I saw being implemented in the V8 9.4 >> engine called "*class static initialization block*". >> >> https://v8.dev/blog/v8-release-94

Re: [PHP-DEV] Class static initialization block

2021-09-13 Thread Rowan Tommins
Hi Mike, I will leave others to discuss the use cases. It would be interesting if people could find the motivating use cases that led to support in C#, Java, and JS. I just wanted to comment quickly on these few points, though: On 13/09/2021 15:05, Mike Schinkel wrote: 1.) Use static ana

Re: [PHP-DEV] Class static initialization block

2021-09-13 Thread Mike Schinkel
> On Sep 13, 2021, at 12:26 PM, Rowan Tommins wrote: > >> 2.) Make the initialization function private. > > I'm not sure how that would work: a private constructor means that it has to > be explicitly called from within the same class, but a static initialiser > would be called by the engine,

Re: [PHP-DEV] Class static initialization block

2021-09-13 Thread Alexandru Pătrănescu
On Sun, Sep 12, 2021 at 2:28 AM David Rodrigues wrote: > Hello! > > I would like to suggest a feature I saw being implemented in the V8 9.4 > engine called "*class static initialization block*". > > https://v8.dev/blog/v8-release-94 > > In short, it is a method that is executed once when a class