Re: [VOTE] Warn about invalid strings in arithmetic
| From: | Yasuo Ohgaki | 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 internals+get-91937@lists.php.net to get a copy of this message | ||
Hi,
On Fri, Mar 25, 2016 at 6:25 AM, Björn Larsson
<bjorn.x.larsson@telia.com> 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
yohgaki@ohgaki.net