Re: [VOTE] Warn about invalid strings in arithmetic

From: Date: Fri, 25 Mar 2016 10:16:37 +0000
Subject: Re: [VOTE] Warn about invalid strings in arithmetic
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Hi,

On Fri, Mar 25, 2016 at 6:25 AM, Björn Larsson
<[email protected]> wrote:
> Came to think on a conversation with Sara G last year about introducing
> the following operators, namely >==, <== & <==> working exactly like the
> existing ones but without type juggling.

>==, <== were not introduced because results are not useful.

For instance,
(10 >== "0") === false
does not make much sense with PHP. It would not solve problem, but
creates new hard to debug problem.

However, raising errors and (10 >== "0") === null make sense. IMO..

Regards,

--
Yasuo Ohgaki
[email protected]


Thread (7 messages)

« previous php.internals (#91937) next »