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

From: Date: Mon, 14 Jul 2014 22:24:31 +0000
Subject: Re: [RFC] Scalar Type Hinting With Casts (re-opening)
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-75512@lists.php.net to get a copy of this message
On Tue, Jul 15, 2014 at 01:16:49AM +0300, Park Framework wrote:
> Maybe we should make two different syntax?
> 
> fun(int $num, array $list)       - for strict type compliance
> fun((int) $num, (array) $list)  - converted to type

+1

Don't forget to note that we will still retain the current syntax:

  fun($num, $list)       - arguments passed as is, not type checking/juggling

-- 
Alain Williams
Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer.
+44 (0) 787 668 0256  http://www.phcomp.co.uk/
Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php
#include <std_disclaimer.h>


Thread (250 messages)

« previous php.internals (#75512) next »