Re: [PHP-DEV] Expanding the scope of the #[NoDiscard] attribute

2025-07-01 Thread Tim Düsterhus
Hi Am 2025-07-01 16:41, schrieb Kenta Usami: I'm writing to start a discussion about expanding the use of the newly accepted #[NoDiscard] attribute. I believe this attribute is a fantastic addition that will help prevent many subtle bugs, and we can make it even more effective by applying it to

Re: [PHP-DEV] [RFC][DISCUSSION] Add RFC 4648 compliant data encoding API

2025-07-01 Thread ignace nyamagana butera
On Tue, Jul 1, 2025 at 1:09 PM Rowan Tommins [IMSoP] wrote: > > > On 19 June 2025 12:01:04 BST, ignace nyamagana butera > wrote: > >RFC proposal link: https://wiki.php.net/rfc/data_encoding_api > > Thanks for working on this, I have often had to implement base64url and > been frustrated it's not

Re: [PHP-DEV] Expanding the scope of the #[NoDiscard] attribute

2025-07-01 Thread Kenta Usami
Hi Tim, Thank you for your reply and for the clarification. As one of the RFC authors, your insight is very helpful. I now have a much clearer understanding of the RFC's intent. Your point that #[NoDiscard] is not meant for every pure function, but rather for those where ignoring the return value

Re: [PHP-DEV] [RFC][DISCUSSION] Add RFC 4648 compliant data encoding API

2025-07-01 Thread Larry Garfield
On Fri, Jun 20, 2025, at 3:17 AM, ignace nyamagana butera wrote: > - it'd be great to default to url-safe base64. The RFC-compliant > variant is a very common risk, it'd be great to be on the safe side by > default > > I went with the RFC recommendation to set up the default. In case of > Base6

Re: [PHP-DEV] [RFC] Readonly property hooks

2025-07-01 Thread Tim Düsterhus
Hi Am 2025-06-09 17:11, schrieb Larry Garfield: I also fleshed out the __get mention with an example that shows what you can already do today, and in fact could since 8.1 when readonly was introduced. The hard guarantee of idempotency has never actually been there. (This also speaks to Claud

Re: [PHP-DEV] [RFC][DISCUSSION] Add RFC 4648 compliant data encoding API

2025-07-01 Thread Tim Düsterhus
Hi Am 2025-07-01 16:18, schrieb Larry Garfield: I don't follow. Every function listed allows a timing mode to be set, so I presume that means every function *can* use constant-time. The implementation is, well, this RFC. :-) So I don't see why we can't just force constant-time everywhere an

Re: [PHP-DEV] [RFC][DISCUSSION] Add RFC 4648 compliant data encoding API

2025-07-01 Thread ignace nyamagana butera
Hi Larry, I have updated the wording of the RFC to give the reason for the default selected variant for each function family. I have also dropped the Variant suffix from the algorithm variant enum. Hope this answers your remarks On Tue, Jul 1, 2025 at 4:20 PM Larry Garfield wrote: > On Fri, Ju

Re: [PHP-DEV] [RFC][DISCUSSION] Add RFC 4648 compliant data encoding API

2025-07-01 Thread ignace nyamagana butera
Hi all, I have updated the RFC (https://wiki.php.net/rfc/data_encoding_api) to include base58 encoding and decoding functions to the proposal with arguments in favor of the addition. Best regards, Ignace On Fri, Jun 20, 2025 at 10:17 AM ignace nyamagana butera < nyamsp...@gmail.com> wrote: > T

Re: [PHP-DEV] [VOTE] str_icontains

2025-07-01 Thread youkidearitai
Hi, Adam, and internals I don't have a authority of vote. But I don't think make sense to support case-insensitive only ASCII of str_contains. Because it benefit is only ASCII region. I want to also supports Unicode case-insensitive for str_starts_with and str_ends_with. I'm glad to discuss to im

Re: [PHP-DEV] [VOTE] str_icontains

2025-07-01 Thread Adam Cable
On Tue, Jul 1, 2025 at 8:24 AM Tim Düsterhus wrote: > Hi > > Am 2025-07-01 09:01, schrieb Adam Cable: > > Voting just opened on the "str_icontains" RFC. > > > > Please find the following resources: > > > > RFC: https://wiki.php.net/rfc/str_icontains > > Discussion: https://externals.io/message/12

Re: [PHP-DEV][Voting] Add locale for case insensitive grapheme functions

2025-07-01 Thread Derick Rethans
On Mon, 30 Jun 2025, youkidearitai wrote: > 2025年6月30日(月) 18:49 Derick Rethans : > > > > On Mon, 30 Jun 2025, youkidearitai wrote: > > > > > I have just started add locale for grapheme_* functions. > > > https://wiki.php.net/rfc/grapheme_add_locale_for_case_insensitive > > > > > > Voting end is 2

Re: [PHP-DEV][RFC] Deprecate type juggling to and from bool type within the function type juggling context

2025-07-01 Thread Gina P. Banyard
On Monday, 30 June 2025 at 16:05, Christian Schneider wrote: > Am 26.06.2025 um 14:04 schrieb Gina P. Banyard intern...@gpb.moe: > > > On Monday, 2 June 2025 at 17:11, Gina P. Banyard intern...@gpb.moe wrote: > > > > > Hello internals, > > > > > > This is the first RFC out of a set of type sy

Re: [PHP-DEV] [VOTE] str_icontains

2025-07-01 Thread Tim Düsterhus
Hi Am 2025-07-01 09:01, schrieb Adam Cable: Voting just opened on the "str_icontains" RFC. Please find the following resources: RFC: https://wiki.php.net/rfc/str_icontains Discussion: https://externals.io/message/127667 PR: https://github.com/php/php-src/pull/18705 Thank you for your RFC. Wh

Re: [PHP-DEV] [VOTE] str_icontains

2025-07-01 Thread Derick Rethans
On Tue, 1 Jul 2025, Adam Cable wrote: > Hi, > > Voting just opened on the "str_icontains" RFC. > > Please find the following resources: > > RFC: https://wiki.php.net/rfc/str_icontains > Discussion: https://externals.io/message/127667 > PR: https://github.com/php/php-src/pull/18705 > > As with

Re: [PHP-DEV] [VOTE] str_icontains

2025-07-01 Thread Andreas Heigl
Hey Adam Am 01.07.25 um 09:01 schrieb Adam Cable: Hi, Voting just opened on the "str_icontains" RFC. I have also voted *no* on this RFC for 2 reasons. 1. I also think that - if we go that route - the other convenience functions around strpos need to be taken into account here as well. 2.

Re: [PHP-DEV] [VOTE] str_icontains

2025-07-01 Thread Tim Düsterhus
Hi Am 2025-07-01 10:17, schrieb Adam Cable: Thanks for giving an explanation of your vote, thank you. I had assumed that going with a small RFC for this would be easier than trying to get str_starts/ends_with through at the same time, as noted in the PR: "I'll create a RFC for this, and if su

Re: [PHP-DEV] [RFC][DISCUSSION] Add RFC 4648 compliant data encoding API

2025-07-01 Thread Rowan Tommins [IMSoP]
On 19 June 2025 12:01:04 BST, ignace nyamagana butera wrote: >RFC proposal link: https://wiki.php.net/rfc/data_encoding_api Thanks for working on this, I have often had to implement base64url and been frustrated it's not just a built-in option. I like the look of the new API. Using namespac

Re: [PHP-DEV] [RFC][DISCUSSION] Add RFC 4648 compliant data encoding API

2025-07-01 Thread Larry Garfield
On Tue, Jul 1, 2025, at 9:32 AM, Tim Düsterhus wrote: >> For the long-names issue that Tim pointed out, perhaps drop "Variant" >> from the enum names? As they're namespaced, `Base32::Ascii` seems >> fairly self-explanatory. > > You probably meant s/Tim/Rowan/. > > Best regards > Tim Düsterhus

[PHP-DEV] Expanding the scope of the #[NoDiscard] attribute

2025-07-01 Thread Kenta Usami
Hi internals, I'm writing to start a discussion about expanding the use of the newly accepted #[NoDiscard] attribute. I believe this attribute is a fantastic addition that will help prevent many subtle bugs, and we can make it even more effective by applying it to a broader set of core functions.

Re: [PHP-DEV][Voting] Add locale for case insensitive grapheme functions

2025-07-01 Thread youkidearitai
2025年7月1日(火) 19:02 Derick Rethans : > > On Mon, 30 Jun 2025, youkidearitai wrote: > > > 2025年6月30日(月) 18:49 Derick Rethans : > > > > > > On Mon, 30 Jun 2025, youkidearitai wrote: > > > > > > > I have just started add locale for grapheme_* functions. > > > > https://wiki.php.net/rfc/grapheme_add_loc

[PHP-DEV] [VOTE] str_icontains

2025-07-01 Thread Adam Cable
Hi, Voting just opened on the "str_icontains" RFC. Please find the following resources: RFC: https://wiki.php.net/rfc/str_icontains Discussion: https://externals.io/message/127667 PR: https://github.com/php/php-src/pull/18705 As with every RFC, a 2/3 majority is required. Voting ends 2025-07-16