Re: [RFC][Accepted] Scalar Type Declarations V0.5

From: Date: Wed, 18 Mar 2015 14:33:46 +0000
Subject: Re: [RFC][Accepted] Scalar Type Declarations V0.5
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-85195@lists.php.net to get a copy of this message
Pavel Kouřil wrote: > On Wed, Mar 18, 2015 at 1:47 PM, Anatol Belski <anatol.php@belski.net> 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

« previous php.internals (#85195) next »