Re: [RFC] Scalar Type Hinting With Casts (re-opening)

From: Date: Sun, 20 Jul 2014 13:13:31 +0000
Subject: Re: [RFC] Scalar Type Hinting With Casts (re-opening)
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-75710@lists.php.net to get a copy of this message
On 20 Jul 2014, at 14:11, Andrea Faulds <ajf@ajf.me> wrote: > double Did I just say double? I meant float, of course. :) The patch actually warns you if you try to do this now: function foo(double $foo) {} foo(1.0); If you use one of the non-existent aliases (double), and pass the type that alias is supposed to hint for (a float), the error message notes you might be looking for the actual type hint (float). The same for integer and boolean (only int and bool, respectively, are permitted). -- Andrea Faulds http://ajf.me/

« previous php.internals (#75710) next »