Pavel Kouřil wrote:
> On Wed, Mar 18, 2015 at 1:47 PM, Anatol Belski <[email protected]> wrote:
>>
>> for anyone needing to test on Windows, there was builds for an older RFC
>> version
>>
>> http://windows.php.net/downloads/snaps/ostc/scalar_type_hints_2_strict_mode/
>>
>> but I just made quick builds for the current as well
>>
>> http://windows.php.net/downloads/snaps/ostc/scalar_type_hints_v5/
>>
>> So you've got the choice.
>
> I've tried the build, and it seems like it's in the strict mode 100%
> by default, and the "declare" statement doesn't recognize strict_types
> ("PHP Warning: Unsupported declare 'strict_types'"). Is this
> intentional?
I quickly tried both php-7.0.0-dev-nts-Win32-VC11-x64.zip, but it seems
the 2015-03-18 build doesn't handle scalar type hints at all.
<?php
function foo(int $n) {
var_dump($n);
}
foo(42);
Catchable fatal error: Argument 1 passed to foo() must be an
instance of int, integer given, called in [...] on line 6 and
defined in [...] on line 3
The 2015-02-09 build works fine, at least for this example.
--
Christoph M. Becker
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php