Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:75465 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92728 invoked from network); 14 Jul 2014 14:38:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Jul 2014 14:38:30 -0000 Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 82.113.146.227 as permitted sender) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.113.146.227 xdebug.org Linux 2.6 Received: from [82.113.146.227] ([82.113.146.227:41003] helo=xdebug.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F3/30-25444-46BE3C35 for ; Mon, 14 Jul 2014 10:38:29 -0400 Received: from localhost (localhost [IPv6:::1]) by xdebug.org (Postfix) with ESMTPS id 566D710C053; Mon, 14 Jul 2014 15:38:25 +0100 (BST) Date: Mon, 14 Jul 2014 15:38:25 +0100 (BST) X-X-Sender: derick@whisky.home.derickrethans.nl To: Andrea Faulds cc: PHP internals In-Reply-To: <08503591-EFC8-48E6-984E-FFC292C5EA5F@ajf.me> Message-ID: References: <08503591-EFC8-48E6-984E-FFC292C5EA5F@ajf.me> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] [RFC] Scalar Type Hinting With Casts (re-opening) From: derick@php.net (Derick Rethans) On Sun, 13 Jul 2014, Andrea Faulds wrote: > The RFC is here: > https://wiki.php.net/rfc/scalar_type_hinting_with_cast I am worried about this big casting conversion matrix. New rules should not be invented, and the following should *always* be equivalent: function foo(typehint $var) vs: function foo($var) { $var = typehint $var; In general, I am not in favour of casting typehints, as it would be a different behaviour from the hard-check typehints that we already have for classes and arrays. regards, Derick -- http://derickrethans.nl | http://xdebug.org Like Xdebug? Consider a donation: http://xdebug.org/donate.php twitter: @derickr and @xdebug Posted with an email client that doesn't mangle email: alpine