Re: [PHP-DEV] rounding integers

2023-05-22 Thread David Gebler
On Sun, May 21, 2023 at 4:21 PM Larry Garfield wrote: > > Having recently been bitten by floor() returning a float even though the > value that comes back is logically an int, I would be fully in support of > "and returns an int" versions of these functions in core. > What about adding a third,

Re: [PHP-DEV] RFC [Discussion]: Marking overridden methods (#[\Override])

2023-05-22 Thread David Gebler
On Mon, May 22, 2023 at 1:01 PM Dan Ackroyd wrote: > Even for those who use static analysis, most (afaik) don't have it > running constantly in local development and this RFC would prevent > people wondering why their code is behaving surprisingly before it is > static analysed. > It takes care

Re: [PHP-DEV] RFC [Discussion]: mb_str_pad

2023-05-22 Thread Jorg Sowa
It's a reasonable approach. Thanks for clearing it up. Kind regards, Jorg

Re: [PHP-DEV] RFC [Discussion]: mb_str_pad

2023-05-22 Thread Niels Dossche
Hi On 5/22/23 00:08, Jorg Sowa wrote: > Hello, > As this is a new function do you consider any namespace for it? Based on > passed RFC[1] allowing for namespaces in bundled extensions it would be > nice to introduce new functions with namespace. Maybe the namespace could > be voted in the RFC sepa

Re: [PHP-DEV] RFC [Discussion]: Marking overridden methods (#[\Override])

2023-05-22 Thread Ilija Tovilo
Hi Tim On Thu, May 11, 2023 at 6:37 PM Tim Düsterhus wrote: > I'm now opening discussion for the RFC "Marking overridden methods > (#[\Override])": > > RFC: Marking overridden methods (#[\Override]) > https://wiki.php.net/rfc/marking_overriden_methods We've already talked in private, but let me

Re: [PHP-DEV] RFC [Discussion]: Marking overridden methods (#[\Override])

2023-05-22 Thread Marco Pivetta
Amazing wording Dan: great way to drive people away. YIKES. Marco Pivetta https://mastodon.social/@ocramius https://ocramius.github.io/ On Mon, 22 May 2023 at 13:49, Dan Ackroyd wrote: > On Thu, 18 May 2023 at 09:12, Marco Pivetta wrote: > > > > I am not sure this RFC is really relevant...

Re: [PHP-DEV] RFC [Discussion]: Marking overridden methods (#[\Override])

2023-05-22 Thread Rowan Tommins
On Mon, 22 May 2023 at 12:49, Dan Ackroyd wrote: > > So one should be able to see there is interestunless of course > someone is so bad at basic human empathy, that they can't accept other > people's lived experiences as valid, and will only accept something as > 'good programming practice' i

Re: [PHP-DEV] RFC [Discussion]: Marking overridden methods (#[\Override])

2023-05-22 Thread Dan Ackroyd
On Sat, 20 May 2023 at 18:58, David Gebler wrote: > > this is exactly the kind of check which you would > expect to be done at the static analysis stage Even for those who use static analysis, most (afaik) don't have it running constantly in local development and this RFC would prevent people won

Re: [PHP-DEV] rounding integers

2023-05-22 Thread Robert Landers
> New function(s) on the other hand sounds like an ugly solution as well > only helping people explicitly searching for it after they got bitten at > least once. What about deprecating round() in favor of round_float() and round_int()? or something. Robert Landers Software Engineer Utrecht NL --

Re: [PHP-DEV] RFC [Discussion]: Marking overridden methods (#[\Override])

2023-05-22 Thread Dan Ackroyd
On Thu, 18 May 2023 at 09:12, Marco Pivetta wrote: > > I am not sure this RFC is really relevant... Would it perhaps > make sense to have this in userland first, in phpstan or psalm > plugins, to see if there is interest? The RFC lists other languages where an equivalent is available, and we can

Re: [PHP-DEV] rounding integers

2023-05-22 Thread Marc Bennewitz
On 21.05.23 17:20, Larry Garfield wrote: On Sun, May 21, 2023, at 7:18 AM, Rowan Tommins wrote: On 21 May 2023 13:00:30 BST, Dan Ackroyd wrote: On Sun, 21 May 2023 at 06:16, Marc wrote: Do you think this could be an acceptable BC-break No. Suggesting changing a 30 year old maths operations

Re: [PHP-DEV] RFC [Discussion]: mb_str_pad

2023-05-22 Thread Tim Düsterhus
Hi On 5/22/23 00:08, Jorg Sowa wrote: As this is a new function do you consider any namespace for it? Based on passed RFC[1] allowing for namespaces in bundled extensions it would be nice to introduce new functions with namespace. Maybe the namespace could be voted in the RFC separately? […] [1]