Re: [PHP-DEV] [RFC] Deprecations for PHP 8.4

2024-07-15 Thread Brandon Jackson
On Mon, Jul 15, 2024 at 4:31 PM Tim Düsterhus wrote: > > Yes it does. SHA-256 is safer than MD5. And on modern CPUs with sha_ni > extensions, it's also faster. The following is on a Intel i7-1365U: > > > $ openssl speed md5 sha1 sha256 sha512 > > *snip* > > version: 3.0.10 > > built on: Wed Feb 21

Re: [PHP-DEV] [Early Feedback] Pattern matching

2024-06-22 Thread Brandon Jackson
On Fri, Jun 21, 2024 at 1:22 PM Larry Garfield wrote: > > To give more context, as noted, this is a stepping stone toward ADTs. > Anything that is on the "hot path" for ADT support I would consider > mandatory, so trying to split it up will just take more time and effort. > That includes the

Re: [PHP-DEV] [Early Feedback] Pattern matching

2024-06-21 Thread Brandon Jackson
> Ilija and I have been working on and off on an RFC for pattern matching since > the early work on Enumerations. A number of people have noticed and said > they're looking forward to it. Hi Larry, I have definitely been looking forward to this. Perhaps more so than property hooks and avis. >

Re: [PHP-DEV] Two new functions array_first() and array_last()

2023-10-18 Thread Brandon Jackson
> The only portion in your email I disagree with is this ending. I believe > there are enough use-cases where if the first value is "valid null" or > "default null" it won't matter. The developer will treat them both the same. > Perhaps you disagree with this and want to avoid ambiguity at all c

Re: [PHP-DEV] Two new functions array_first() and array_last()

2023-10-18 Thread Brandon Jackson
> You may be using them and be totally unaware that you are using them. Emphasis on that. Take promises for example. Anyone using libraries that incorporate promises either are using fibers or will likely be using them in the near future. And I'd say that one pattern is probably used enough to be

Re: [PHP-DEV] Two new functions array_first() and array_last()

2023-10-18 Thread Brandon Jackson
> This function signature can be accomplished by userland once we have > `array_key_first()` and `array_first()`. It's much better to keep > `array_first()` as simple as possible and let everyone build their own > approach to go about it since we have so many approaches. The goal wasn't necessa

Re: [PHP-DEV] Two new functions array_first() and array_last()

2023-10-17 Thread Brandon Jackson
> There is also a technique to make the return value `[$key => $value]` instead > of just a value, but this loses simplicity. Hmm, since the naming array_first and array_last doesn't clarify that it's returning a key or a value. What if it returned both as ?[key, value]. That opens quite a few u

Re: [PHP-DEV] [RFC] [Discussion] Clone with

2023-05-29 Thread Brandon Jackson
(...$myFunc($obj)); You even have the ability to pass it whatever you want including the original object to operate off of. Regards, Brandon Jackson -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php