Re: [RFC][Accepted] Scalar Type Declarations V0.5
| From: | Yasuo Ohgaki | Date: | Wed, 18 Mar 2015 04:44:22 +0000 |
| Subject: | Re: [RFC][Accepted] Scalar Type Declarations V0.5 | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-85165@lists.php.net to get a copy of this message | ||
Hi Pierre,
On Wed, Mar 18, 2015 at 1:35 PM, Pierre Joye <pierre.php@gmail.com> wrote:
> On Mar 18, 2015 11:26 AM, "Yasuo Ohgaki" <yohgaki@ohgaki.net> wrote:
>
> > I didn't have my time to spent for the patch. So I don't verify this
> > by myself, but it seems common sense for this RFC.
>
> So you voted against it without knowing how it actually works or aims to
> work? I suggest you to do it now then, before going further with this
> discussion :)
>
I know we are better to play with patch before vote.
I played with Zeev's patch and I was sure it's better ;)
How many of voters spend enough time for both patches before vote?
The reason I admit that I didn't spent time to play with the patch is
following behavior does not make sense to me much and I have
doubt for it.
lib.php:
<?php
declare(strict_types = 1);
function foo(int $a) {
// no function call here
}
?>
The declare here does just nothing.
<?php
require "lib.php";
foo("123"); // will work
?>
<?php
declare(strict_types = 1);
require "lib.php";
foo("123"); // will give an error
?>
Could someone knowledgeable shed light on this?
Regards,
--
Yasuo Ohgaki
yohgaki@ohgaki.net