On Wed, Mar 16, 2016 at 12:49 PM, Will Fitch <willfi...@php.net> wrote:
>
>
> On Wed, Mar 16, 2016, at 11:36 AM, Phil Sturgeon wrote:
>> Hello everyone,
>>
>> I have completed the draft for an RFC, to add Typed Properties. The
>> patch has been written by the one and only Joe Watkins.
>>
>> https://wiki.php.net/rfc/typed-properties
>>
>> I would really appreciate constructive feedback on this RFC, with a
>> few areas especially:
>>
>> 1. How scared are we that integers can be expanded to floats on runtime?
>
> First, this looks awesome, Phil!
>
> After reading through it, I think we can consult with function return
> types:
>
> function blah() : int {
>     return 55.5;
> }
>
> var_dump(blah());
>
> Will return 55.  It's a little different with properties, but what are
> your thoughts on this runtime conversion?
>

Hey Will,

Sure you'll see 55 in weak mode, but in strict mode you'll see 55.5.

I don't really want to delve too much into how return types work in
this RFC, because it doesn't feel entirely relevant.

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

Reply via email to