Re: [PHP-DEV] [RFC] [Vote] Type Guards for Classes

2024-05-17 Thread Casper Langemeijer
On Thu, May 16, 2024, at 22:31, Patrik Václavek wrote: > This feature aims to simplify and standardize the process of verifying that a > variable is an instance of a specific class, enhancing code readability and > reducing boilerplate code. > > Currently, in PHP, to ensure that a variable is

Re: [PHP-DEV][RFC] grapheme cluster for str_split, grapheme_str_split function

2024-03-28 Thread Casper Langemeijer
> So... if you want to help make people more aware of the grapheme_* > functions, one place to start would be editing the documentation for the > various string, mbstring, and grapheme functions to use consistent > terminology, and sign-post each other more clearly. >

Re: [PHP-DEV][RFC] grapheme cluster for str_split, grapheme_str_split function

2024-03-26 Thread Casper Langemeijer
On Tue, Mar 26, 2024, at 18:15, Derick Rethans wrote: > Many of these already exist, such as grapheme_substr. We can't simply change > the behaviour of the already existing functions due to BC reasons. Wow. I feel very stupid. I feel I should have known about grapheme_*, but I didn't. Oh my,

Re: [PHP-DEV][RFC] grapheme cluster for str_split, grapheme_str_split function

2024-03-26 Thread Casper Langemeijer
I'd like to address an issue I have with this RFC. I'm not sure is solves a problem by itself. If I understand all of this correctly this only does what already can be accomplished with preg_match_all('/\X/u', ...). The result of this method in my opinion is not very usefull by itself. I've

Re: [PHP-DEV] Why are serialized strings wrapped in double quotes? (s::"")

2024-02-09 Thread Casper Langemeijer
On Tue, Feb 6, 2024, at 21:19, Sanford Whiteman wrote: > I'd like a little background on something we've long accepted: why > does the serialization format need double quotes around a string, even > though the byte length is explicit? > Instead we need to be aware of the leading and trailing " in

Re: [PHP-DEV] Proposal: addition of array_find() and array_find_key() functions

2023-06-01 Thread Casper Langemeijer
On Thu, Jun 1, 2023, at 18:02, Janusz Szczypka wrote: > array_find(): This function would allow developers to find the first element > in > an array that satisfies a specific condition. The condition would be defined > by a callback function. This would actually be an alternative to a simple

Re: [PHP-DEV] [RFC] [Discussion] Add new function `array_group`

2023-06-01 Thread Casper Langemeijer
On Thu, Jun 1, 2023, at 11:56, Boro Sitnikovski wrote: > Thank you for the suggestion, I like this approach and it's definitely much > "safer" than going with an RFC for core directly. > > What are your thoughts on creating a PECL extension called `array_utils` > (selling point would be high

Re: [PHP-DEV] [RFC] [Discussion] Add new function `array_group`

2023-06-01 Thread Casper Langemeijer
On Thu, Jun 1, 2023, at 01:19, Boro Sitnikovski wrote: > Thank you for the information and encouragement! I was a bit scared of this > one being rejected too, but still decided to give it a shot :) As an alternative approach this is what I would do in your situation: I would start with a PHP

Re: [PHP-DEV] Windows PECL build machine died

2023-04-23 Thread Casper Langemeijer
Nothing seems to happen on this front, and our Windows users like to move to PHP 8.2 too. The windows.php.net site states: "This is because the Windows PECL build machine died, and the team is still working on the long term plan of building DLLs for PECL extensions with a new CI process." We

Re: [PHP-DEV] [RFC] Asymmetric visibility

2022-08-08 Thread Casper Langemeijer
On Mon, Aug 8, 2022, at 10:23, Andreas Heigl wrote: > Your use case might not need them (though actually you are needing them, > you just don't use them as language feature but via the static-analysis > annotation) > > But when discussing language features we should always keep ALL users of

Re: [PHP-DEV] [RFC] Asymmetric visibility

2022-08-08 Thread Casper Langemeijer
Hi all, In the discussion I sometimes see the terminology 'readonly' and 'writable' being used. This is confusing because when the property is an object that itself is mutable, there is nothing read-only about it. The terminology in the RFC seems right to me, and overall it seems solid.

Re: [PHP-DEV] Changes to Git commit workflow

2021-04-18 Thread Casper Langemeijer
On 01-04-2021 06:54, Bishop Bettini wrote: I've documented why we need signing, and how to set it up: https://wiki.php.net/vcs/commit-signing Feedback welcomed! In "Step 5 of 7: Configure git to use that key ID" you set `git config --global --replace user.signingkey "${GPG_KEYID}"` I found

[PHP-DEV] Re: Bug 61272

2012-11-26 Thread Casper Langemeijer
On 11/26/2012 10:19 AM, Michael Wallner wrote: I'm sorry that the new output control layer causes you such headaches. IIRC, 6 years back, when I implemented the new output control functionality, I kindly asked the list, whether to rather implement what's documented, or what the old code did,

[PHP-DEV] Bug 61272

2012-11-25 Thread Casper Langemeijer
Hi all, Somewhere in May this year I discovered that our software would not run on PHP 5.4 because of changed behaviour of ob_start(). I discovered a bugreport that was marked 'Not a bug', but valuable info was already added to it. I contacted Michael Wallner (mike) directly because he