Re: [PHP-DEV] [RFC] Preloading

2018-10-21 Thread Dmitry Stogov
On Oct 20, 2018 5:28 AM, Levi Morrison wrote: > I would like to start discussion on a Preloadng RFC > https://wiki.php.net/rfc/preload > > This technology would allow loading some PHP files on server startup and make > all the defined classes and functions to be permanently available in the >

Re: [PHP-DEV] [RFC] Preloading

2018-10-21 Thread Dmitry Stogov
On Oct 19, 2018 9:39 PM, Rasmus Lerdorf wrote: On Fri, Oct 19, 2018 at 1:17 AM, Dmitry Stogov mailto:dmi...@zend.com>> wrote: Hi Internals, I would like to start discussion on a Preloadng RFC https://wiki.php.net/rfc/preload This technology would allow loading some PHP files on server startu

Re: [PHP-DEV] [RFC] Preloading

2018-10-21 Thread Dmitry Stogov
On Oct 19, 2018 8:12 PM, Jakub Zelenka wrote: On Fri, Oct 19, 2018 at 9:17 AM Dmitry Stogov mailto:dmi...@zend.com>> wrote: Hi Internals, I would like to start discussion on a Preloadng RFC https://wiki.php.net/rfc/preload Nice! Apology if I missed it in the RFC but can't find in which st

Re: [PHP-DEV] [PATCH] Implementing array_every() and array_any()

2018-10-21 Thread Levi Morrison
On Sun, Oct 21, 2018 at 10:04 PM bugreportuser wrote: > > Hi everyone, > > A patch for array_every() and array_any() was abandoned from inactivity, > so I wrote a new patch for it: > > https://github.com/php/php-src/pull/3597 > > There was never an internals@ discussion that I can find, but there

Re: [PHP-DEV] Composition over inheritance: native support for "delegating" methods?

2018-10-21 Thread Sebastian Bergmann
Am 21.10.2018 um 23:42 schrieb Marco Pivetta: 1. the language already has all the tooling required to implement decorators correctly 2. the addition of a `delegate` functionality would cause more confusion for something that is already really trivial to implement/test/read ACK -- PHP Inter

Re: [PHP-DEV] [PATCH] Implementing array_every() and array_any()

2018-10-21 Thread Sara Golemon
On Sun, Oct 21, 2018 at 11:03 PM bugreportuser wrote: > A patch for array_every() and array_any() was abandoned from inactivity, > so I wrote a new patch for it: > > https://github.com/php/php-src/pull/3597 > > There was never an internals@ discussion that I can find, but there are > some comments

[PHP-DEV] [PATCH] Implementing array_every() and array_any()

2018-10-21 Thread bugreportuser
Hi everyone, A patch for array_every() and array_any() was abandoned from inactivity, so I wrote a new patch for it: https://github.com/php/php-src/pull/3597 There was never an internals@ discussion that I can find, but there are some comments on the old pull request. Most of what I changed was

Re: [PHP-DEV] Composition over inheritance: native support for "delegating" methods?

2018-10-21 Thread Levi Morrison
I have wanted something like this before. I used a trait helper. This worked for this domain because there is an interface that is well established for the helper to use. Here's an example (written in my email client, untested): trait OuterIteratorHelper { abstract function getInnerIterator(): \

[PHP-DEV] Re: [RFC] Improve openssl_random_pseudo_bytes()

2018-10-21 Thread Tom Worster
On 19 Oct 2018, at 16:46, Sammy Kaye Powers wrote: I'd like to start a discussion on the "Improve openssl_random_pseudo_bytes()" RFC: https://wiki.php.net/rfc/improve-openssl-random-pseudo-bytes TL;DR: CSPRNG implementations should always fail closed so this change would make `openssl_random_p

Re: [PHP-DEV] Composition over inheritance: native support for "delegating" methods?

2018-10-21 Thread Marco Pivetta
On Sun, Oct 21, 2018 at 7:41 PM Rowan Collins wrote: > Hi, > > I've been thinking about how the language could better support > Composition patterns like Decorators and Proxies, using some simple > syntax sugar not dissimilar to Traits. > I do not think that this syntactic sugar is needed: * I

[PHP-DEV] Composition over inheritance: native support for "delegating" methods?

2018-10-21 Thread Rowan Collins
Hi, I've been thinking about how the language could better support Composition patterns like Decorators and Proxies, using some simple syntax sugar not dissimilar to Traits. Example problem: The other day, I was writing a session handler which slightly modified the behaviour of one provide