Re: [PHP-DEV] [Discussion] grapheme cluster for str_split function

2024-03-06 Thread youkidearitai
2024年3月6日(水) 18:42 Niels Dossche : > > On 06/03/2024 01:37, youkidearitai wrote: > > 2024年3月6日(水) 9:22 youkidearitai : > >> > >> Hi, Larry > >> Hi, Niels > >> > >> 2024年3月6日(水) 6:47 Niels Dossche : > >>> > >>> Hi Larry > >>> Hi Yuya > >>> > >>> So first of all, I meant the error handling in cases

Re: [PHP-DEV] [Discussion] grapheme cluster for str_split function

2024-03-06 Thread Niels Dossche
On 06/03/2024 01:37, youkidearitai wrote: > 2024年3月6日(水) 9:22 youkidearitai : >> >> Hi, Larry >> Hi, Niels >> >> 2024年3月6日(水) 6:47 Niels Dossche : >>> >>> Hi Larry >>> Hi Yuya >>> >>> So first of all, I meant the error handling in cases like these: >>>

Re: [PHP-DEV] [Discussion] grapheme cluster for str_split function

2024-03-05 Thread youkidearitai
2024年3月6日(水) 9:22 youkidearitai : > > Hi, Larry > Hi, Niels > > 2024年3月6日(水) 6:47 Niels Dossche : > > > > Hi Larry > > Hi Yuya > > > > So first of all, I meant the error handling in cases like these: > >

Re: [PHP-DEV] [Discussion] grapheme cluster for str_split function

2024-03-05 Thread youkidearitai
Hi, Larry Hi, Niels 2024年3月6日(水) 6:47 Niels Dossche : > > Hi Larry > Hi Yuya > > So first of all, I meant the error handling in cases like these: > https://github.com/php/php-src/pull/13580/files#diff-b8fe038d9d7539694593978bea5605f38dde4bcb6a016865130590e45e23202eR852-R860 > The implementation

Re: [PHP-DEV] [Discussion] grapheme cluster for str_split function

2024-03-05 Thread Niels Dossche
Hi Larry Hi Yuya So first of all, I meant the error handling in cases like these: https://github.com/php/php-src/pull/13580/files#diff-b8fe038d9d7539694593978bea5605f38dde4bcb6a016865130590e45e23202eR852-R860 The implementation still returns NULL here, so the signature is still incorrect.

Re: [PHP-DEV] [Discussion] grapheme cluster for str_split function

2024-03-05 Thread Larry Garfield
On Tue, Mar 5, 2024, at 7:25 AM, youkidearitai wrote: > 2024年3月5日(火) 5:52 Niels Dossche : >> >> Hi Yuya >> >> This sounds useful. >> >> I do have a question about the function signature: >> function grapheme_str_split(string $string, int $length = 1): array {} >> >> This always returns an array.

Re: [PHP-DEV] [Discussion] grapheme cluster for str_split function

2024-03-05 Thread youkidearitai
> > Hi, Niels > > Thank you for your comment. > Indeed, returns false is make sense. > > Therefore, I changed to returns false when invalid UTF-8 strings. > > Regards > Yuya > > -- > --- > Yuya Hamada (tekimen) > - https://tekitoh-memdhoi.info > -

Re: [PHP-DEV] [Discussion] grapheme cluster for str_split function

2024-03-04 Thread youkidearitai
2024年3月5日(火) 5:52 Niels Dossche : > > Hi Yuya > > This sounds useful. > > I do have a question about the function signature: > function grapheme_str_split(string $string, int $length = 1): array {} > > This always returns an array. > However, looking at your PR it seems you return NULL on failure,

Re: [PHP-DEV] [Discussion] grapheme cluster for str_split function

2024-03-04 Thread Niels Dossche
Hi Yuya This sounds useful. I do have a question about the function signature: function grapheme_str_split(string $string, int $length = 1): array {} This always returns an array. However, looking at your PR it seems you return NULL on failure, but the return type in the signature isn't