On 1 April 2025 20:52:32 BST, Larry Garfield wrote:
>On Mon, Mar 31, 2025, at 5:03 PM, Niels Dossche wrote:
>> Hi internals!
>>
>> I'm excited to share what I've been working on!
>> I had an epiphany. I realized what we truly need to revolutionize PHP:
>> a new operator.
>>
>> Hear me out.
>> We
Hi
Am 2025-04-01 00:03, schrieb Niels Dossche:
We all had situations where we wanted to compare two floating point
numbers and it turns out that due to the non-exact representation,
seemingly-equal numbers don't match! Gone are those days because the
`~=` operator nicely rounds the numbers for
On 01.04.2025 00:03, Niels Dossche wrote:
We live in an imperfect world, and we often approximate data, but neither `==`
nor `===` are ideal comparison operators to deal with these kinds of data.
I am late to the party here, but in all seriousness when I read the subject my
initial thought wa
I love April Fools jokes.
Yes, and let's add the null coalescing increment and decrement operators:
$foo??++ and $bar??-- . I want to ensure that an undeclared or null
variable defaults to 0 before becoming 1 or -1 without needing to manually
instantiate the variable as 0.
Pfft.
---
Anyhow, wh
On Tue, Apr 1, 2025, at 22:17, Derick Rethans wrote:
> On 1 April 2025 20:52:32 BST, Larry Garfield wrote:
> >On Mon, Mar 31, 2025, at 5:03 PM, Niels Dossche wrote:
> >> Hi internals!
> >>
> >> I'm excited to share what I've been working on!
> >> I had an epiphany. I realized what we truly need to
On Tue, Apr 1, 2025 at 11:29 PM Rob Landers wrote:
> On Tue, Apr 1, 2025, at 22:17, Derick Rethans wrote:
>
> On 1 April 2025 20:52:32 BST, Larry Garfield
> wrote:
> >On Mon, Mar 31, 2025, at 5:03 PM, Niels Dossche wrote:
> >> Hi internals!
> >>
> >> I'm excited to share what I've been working o
On Mon, Mar 31, 2025, at 5:03 PM, Niels Dossche wrote:
> Hi internals!
>
> I'm excited to share what I've been working on!
> I had an epiphany. I realized what we truly need to revolutionize PHP:
> a new operator.
>
> Hear me out.
> We live in an imperfect world, and we often approximate data, but
On Tue, Apr 1, 2025 at 9:14 PM Rob Landers wrote:
> On Tue, Apr 1, 2025, at 15:06, Iliya Miroslavov Iliev wrote:
>
> Claude, in your example if `var_dump(false == true);` is `false` what is
> `true` in this world? It is `true` that `false` is not `true`.
>
> On Tue, Apr 1, 2025 at 3:39 PM Claude
On Tue, Apr 1, 2025, at 15:06, Iliya Miroslavov Iliev wrote:
> Claude, in your example if `var_dump(false == true);` is `false` what is
> `true` in this world? It is `true` that `false` is not `true`.
>
> On Tue, Apr 1, 2025 at 3:39 PM Claude Pache wrote:
>>
>>
>>> Le 1 avr. 2025 à 00:03, Nie
>IMO a step in the right direction, but it doesn't solve the problem that
>the developer might not even know which equality operator to apply.
>Thus, I proprose the whatever (?) equality (=) is right (->) here (!)
>operator, e.g.
You mean something like:
```php
function str_aprox(ClientData $_, st
On 01.04.2025 at 00:03, Niels Dossche wrote:
> We live in an imperfect world, and we often approximate data, but neither
> `==` nor `===` are ideal comparison operators to deal with these kinds of
> data.
>
> Introducing: the "approximately equal" (or "approx-equal") operator `~=` (to
> immitat
Claude, in your example if `var_dump(false == true);` is `false` what is
`true` in this world? It is `true` that `false` is not `true`.
On Tue, Apr 1, 2025 at 3:39 PM Claude Pache wrote:
>
>
> Le 1 avr. 2025 à 00:03, Niels Dossche a écrit :
>
> Hi internals!
>
> I'm excited to share what I've b
> Le 1 avr. 2025 à 00:03, Niels Dossche a écrit :
>
> Hi internals!
>
> I'm excited to share what I've been working on!
> I had an epiphany. I realized what we truly need to revolutionize PHP: a new
> operator.
>
> [...]
> First of all, if `$a == $b` holds, then `$a ~= $b` obviously.
> The t
> var_dump(random_int(1, 1) ~= 1.1); // true
This one cracked me :D Thanks Niels!
On Tue, Apr 1, 2025 at 5:48 AM Alexandru Pătrănescu
wrote:
>
>
> On Tue, Apr 1, 2025, 01:03 Niels Dossche wrote:
>
>> Hi internals!
>>
>> I'm excited to share what I've been working on!
>> I had an epiphany. I r
On Tue, Apr 1, 2025, 01:03 Niels Dossche wrote:
> Hi internals!
>
> I'm excited to share what I've been working on!
> I had an epiphany. I realized what we truly need to revolutionize PHP: a
> new operator.
>
> Hear me out.
> We live in an imperfect world, and we often approximate data, but neith
On 31/03/2025 23:03, Niels Dossche wrote:
Hi internals!
I'm excited to share what I've been working on!
I had an epiphany. I realized what we truly need to revolutionize PHP: a new
operator.
Hear me out.
We live in an imperfect world, and we often approximate data, but neither `==`
nor `===`
16 matches
Mail list logo