> -----Original Message-----
> From: Derick Rethans [mailto:der...@php.net]
> Sent: Wednesday, March 11, 2015 10:37 PM
> To: Zeev Suraski
> Cc: Anthony Ferrara; internals@lists.php.net
> Subject: RE: [PHP-DEV] RE: [VOTE][RFC] Coercive Scalar Type Hints
>
> > You're right, sorry.  Reverse it then:
> > function bar(int $x)
> > $foo = 1.0;
> > bar($foo);  // will definitely fail in strict mode
>
> And it should fail, as logically it is the same as:
>
> $foo = 1.901 - 0.709 - 0.192;
> bar($foo);
>
> which is only 1, if you look at it with a small enough precision.

I'm not sure what you're trying to say.  The two pieces are indeed
identical from all points of view - static analysis, how it would behave
in strict type hinting, weak type hinting or coercive type hinting.

Zeev

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to