[PHP-DEV] Re: RFC: Strict comparisons

2016-10-05 Thread Vesa Kaihlavirta
On Mon, 19 Sep 2016 at 16:04 Vesa Kaihlavirta <vpkai...@gmail.com> wrote: > Hey all, > > I've been bouncing this idea of fixing all comparison operations in one > fell swoop, although with an opt-in declare in the spirit of strict_types. > > So, I thought about this

Re: [PHP-DEV] RFC: Strict comparisons

2016-09-21 Thread Vesa Kaihlavirta
On Tue, 20 Sep 2016 at 02:20 Dan Ackroyd <dan...@basereality.com> wrote: > Hi Vesa, > > On 19 September 2016 at 14:04, Vesa Kaihlavirta <vpkai...@gmail.com> > wrote: > > > > My idea is to add a strict_comparisons declaration that you can add at > the

[PHP-DEV] RFC: Strict comparisons

2016-09-19 Thread Vesa Kaihlavirta
Hey all, I've been bouncing this idea of fixing all comparison operations in one fell swoop, although with an opt-in declare in the spirit of strict_types. Here's the gist: ==, < and > plus all the comparisons done inside switch statements and arrays are not very safe. === helps some, but does