[PHP-DEV] Shutdown Memory Allowance (aka Soft Memory Limit)

2019-09-23 Thread Peter Stalman
Hi Internals, When PHP runs out of memory, a fatal error is triggered and whatever shutdown functions or error handlers take over. However, in the case of error logging, or just logging in general, there often needs to be additional memory used to accommodate the final logging process. This can

Re: [PHP-DEV] PHP 7.4 BC break with openssl_random_pseudo_bytes()

2019-09-23 Thread Pierre Joye
On Mon, Sep 23, 2019 at 10:17 PM Larry Garfield wrote: > I cannot speak for OpenSSL, but random_bytes() and random_int() were changed > very late in the 7.0 cycle to throw exceptions so that they "fail closed". > Otherwise if you expect a random value back but get a constant value (false > o

Re: [PHP-DEV] Re: [RFC] Union Types v2

2019-09-23 Thread Andreas Hennings
To have any information content, a variable (or return value, or parameter) needs to have more than one possible value. If one of those values is TRUE, the most natural alternative value would be FALSE. But should this really be baked into the language? Should really "try to be smart" here? Isn't

Re: [PHP-DEV] Re: [RFC] Union Types v2

2019-09-23 Thread Benjamin Morel
Hi Nikita, Thank you for your work on this, I look forward to being able to use union types! The one thing that bothers me a bit is introducing yet another inconsistency by supporting false and not true as a type. Sure, I do get the need for false as a valid type for historical reasons, but at th

Re: [PHP-DEV] PHP 7.4 BC break with openssl_random_pseudo_bytes()

2019-09-23 Thread M. W. Moe
Hello, "A little side-node: random_int(0, 0) does not throw an exception which makes random_bytes and random_int inconsistent by your logic ;-)" not really; there are still different functions; hence they can differ in their behavior; + that's not a matter of individual logic but an api choice; e

Re: [PHP-DEV] [RFC] Prevent disruptions of conversations

2019-09-23 Thread Stanislav Malyshev
Hi! > You're right that 7.4 will probably come out, I remain concerned that > fixing any bugs that are found during the release process, or > inevitably those found after the 7.4.0 release occurs, would be more > difficult if people are hesitant to discuss issues on internals. What is the base o

Re: [PHP-DEV] PHP 7.4 BC break with openssl_random_pseudo_bytes()

2019-09-23 Thread Christian Schneider
Am 23.09.2019 um 17:16 schrieb Larry Garfield : > I cannot speak for OpenSSL, but random_bytes() and random_int() were changed > very late in the 7.0 cycle to throw exceptions so that they "fail closed". > Otherwise if you expect a random value back but get a constant value (false > or empty s

Re: [PHP-DEV] PHP 7.4 BC break with openssl_random_pseudo_bytes()

2019-09-23 Thread Larry Garfield
On Mon, Sep 23, 2019, at 6:01 AM, Nikita Popov wrote: > On Mon, Sep 23, 2019 at 2:52 PM Christian Schneider > wrote: > > > Hi, > > I just noted (too late in the process, I know) that > > openssl_random_pseudo_bytes(0) now throws an exception. > > > > This breaks code like > > $ivsize = op

Re: [PHP-DEV] [RFC] Prevent disruptions of conversations

2019-09-23 Thread Paul M. Jones
> On Sep 23, 2019, at 09:16, Christoph M. Becker wrote: > > On 23.09.2019 at 15:55, Paul M. Jones wrote: > >> Ah, if only that were true. No, moderators have the power to act >> immediately, whereas any oversight regarding them can act only slowly, with >> deliberation, after long latency -

Re: [PHP-DEV] [RFC] Prevent disruptions of conversations

2019-09-23 Thread Dan Ackroyd
Hi Stas, On Fri, 20 Sep 2019 at 19:36, Stanislav Malyshev wrote: > This has absolutely nothing to do with successful 7.4 > release. If from now on internals became so bad we could > literally agree on nothing, pass no RFCs, make no > decisions, etc. - we still could very well release 7.4 > with

Re: [PHP-DEV] [RFC] Prevent disruptions of conversations

2019-09-23 Thread Christoph M. Becker
On 23.09.2019 at 15:55, Paul M. Jones wrote: > Ah, if only that were true. No, moderators have the power to act immediately, > whereas any oversight regarding them can act only slowly, with deliberation, > after long latency -- and even *then* only after long discussion, which the > moderators

Re: [PHP-DEV] [RFC] Prevent disruptions of conversations

2019-09-23 Thread Paul M. Jones
Hey there -- >>> On Sep 20, 2019, at 01:25, Brent wrote: >>> >>> Moderators are no dictators >> >> Maybe, maybe not. >> >> But moderators can and do play favorites, banning or silencing one voice (of >> whom they disapprove) for the same things that they ignore from another >> voice (of whom

Re: [PHP-DEV] PHP 7.4 BC break with openssl_random_pseudo_bytes()

2019-09-23 Thread Nikita Popov
On Mon, Sep 23, 2019 at 2:52 PM Christian Schneider wrote: > Hi, > I just noted (too late in the process, I know) that > openssl_random_pseudo_bytes(0) now throws an exception. > > This breaks code like > $ivsize = openssl_cipher_iv_length($method); > $iv = openssl_random_pseudo_b

[PHP-DEV] PHP 7.4 BC break with openssl_random_pseudo_bytes()

2019-09-23 Thread Christian Schneider
Hi, I just noted (too late in the process, I know) that openssl_random_pseudo_bytes(0) now throws an exception. This breaks code like $ivsize = openssl_cipher_iv_length($method); $iv = openssl_random_pseudo_bytes($ivsize); $data = openssl_encrypt($string, $method, $key, OP

Re: [PHP-DEV] XML Validation

2019-09-23 Thread Benjamin Eberlei
On Mon, Sep 23, 2019 at 9:47 AM Gert wrote: > Is this something that would need an RFC? > I would think this is possible without the RFC. It is similar to https://wiki.php.net/rfc/json_throw_on_error which everyone +1ed You could write out fully the new suggested method signatures, what excepti

Re: [PHP-DEV] XML Validation

2019-09-23 Thread Gert
Is this something that would need an RFC? I'd be willing to take a shot at it myself, but my C experience is rather limited, so i'm not sure if i could cook up an implementation. On Mon, 23 Sep 2019 at 09:44, Benjamin Eberlei wrote: > > Hi Gert, > > On Mon, Sep 23, 2019 at 9:38 AM Gert wrote:

Re: [PHP-DEV] XML Validation

2019-09-23 Thread Benjamin Eberlei
Hi Gert, On Mon, Sep 23, 2019 at 9:38 AM Gert wrote: > Hi Internals, > > I've been working with XML and validation recently, and the Dom > classes do basically everything that is needed. The only thing is that > to get the errors of the schema validation we call the > `validateSchema` on the Dom

[PHP-DEV] XML Validation

2019-09-23 Thread Gert
Hi Internals, I've been working with XML and validation recently, and the Dom classes do basically everything that is needed. The only thing is that to get the errors of the schema validation we call the `validateSchema` on the DomDocument, and then use the `libxml_get_errors` function to actually

Re: [PHP-DEV] [RFC] Prevent disruptions of conversations

2019-09-23 Thread Brent
Hi Paul On 20 Sep 2019, 16:04 +0200, Paul M. Jones , wrote: > > > > On Sep 20, 2019, at 01:25, Brent wrote: > > > > Moderators are no dictators > > Maybe, maybe not. > > But moderators can and do play favorites, banning or silencing one voice (of > whom they disapprove) for the same things that t