Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82490 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62414 invoked from network); 11 Feb 2015 18:44:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Feb 2015 18:44:43 -0000 Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 192.64.116.200 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.200 imap1-2.ox.privateemail.com Received: from [192.64.116.200] ([192.64.116.200:43576] helo=imap1-2.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 84/12-51722-B13ABD45 for ; Wed, 11 Feb 2015 13:44:43 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 482ABB00091; Wed, 11 Feb 2015 13:44:40 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at imap1.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap1.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id dbABD4vDM5R1; Wed, 11 Feb 2015 13:44:40 -0500 (EST) Received: from oa-res-26-240.wireless.abdn.ac.uk (oa-res-26-240.wireless.abdn.ac.uk [137.50.26.240]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id 241D4B0008E; Wed, 11 Feb 2015 13:44:39 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) In-Reply-To: Date: Wed, 11 Feb 2015 18:44:37 +0000 Cc: Rasmus Lerdorf , Xinchen Hui , PHP Internals Content-Transfer-Encoding: quoted-printable Message-ID: <7102A9DA-C6EF-4AF5-BCB8-38A67BEBD853@ajf.me> References: <8703B53E-2C4A-4AC6-95C4-D4F19C6D5221@ajf.me> <54DAF884.7000508@lerdorf.com> To: =?utf-8?Q?Pavel_Kou=C5=99il?= X-Mailer: Apple Mail (2.2070.6) Subject: Re: [PHP-DEV] [VOTE] Scalar Type Hints From: ajf@ajf.me (Andrea Faulds) Hi Pavel,=20 > On 11 Feb 2015, at 07:41, Pavel Kou=C5=99il = wrote: >=20 > Also, I realized one thing why I think the strict version is a bad > idea for PHP (in the state PHP is now - in an ideal world I would love > to have nothing but strongly typed PHP, but that's offtopic) - PHP has > many functions that return multiple types, so you cannot do foo(bar()) > if bar() has multiple return types. :( You can=E2=80=99t do it with weak types either. Functions with multiple = return type usually do so in order to use one type for success, and = another return type on failure. In weak typing mode, PHP would just = mangle the error value (like FALSE). -- Andrea Faulds http://ajf.me/