Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:75497 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45289 invoked from network); 14 Jul 2014 17:26:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Jul 2014 17:26:21 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.169 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.169 mail-wi0-f169.google.com Received: from [209.85.212.169] ([209.85.212.169:37128] helo=mail-wi0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 31/00-45205-CB214C35 for ; Mon, 14 Jul 2014 13:26:21 -0400 Received: by mail-wi0-f169.google.com with SMTP id n3so2840686wiv.0 for ; Mon, 14 Jul 2014 10:26:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=NShJ1PQcCHFq1SyHA0omveiLXDaLQHouj5MIbjoMKAY=; b=SEtkYTcv/821EH1xNi6XX1O48g0RScSipT6HKFHN/IEpifIPpms2VdDzxUszQaay3T 6RGUVfdnJpFVobczxKnCBxGSTGGo3HrAod1uhDEiDP7PsC271bfDk1DuWkZrYrJOfKow L4B84O/eygNQqfuFGkvk1PMYbDxn3ud7gfI9N/piu1NQfuUvOK+Wc/PHm8zta1xX1yEx dfIhl3GGkRcy+zr+KNKuguC+lTiln7uguIhsgOw794XRm8UeOoIUjcVIPnGyYeeY6GBX X7yKd59DgLrRUDrXNX2Uk54kyF1DDXb9hkk0TnSh1fTBmZlBtg+gZ27ozZsayr+ZFFYc tcUg== X-Received: by 10.180.86.7 with SMTP id l7mr25727265wiz.55.1405358777718; Mon, 14 Jul 2014 10:26:17 -0700 (PDT) Received: from [192.168.0.139] ([62.189.198.114]) by mx.google.com with ESMTPSA id ub11sm33405091wib.1.2014.07.14.10.26.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 14 Jul 2014 10:26:16 -0700 (PDT) Message-ID: <53C41244.5010505@gmail.com> Date: Mon, 14 Jul 2014 18:24:20 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: internals@lists.php.net References: <08503591-EFC8-48E6-984E-FFC292C5EA5F@ajf.me> <53C3F70A.7010706@gmail.com> <3aa29e080d70c843713e19a952dfbad6@mail.gmail.com> <3b06c592b0b88bb95d3ae7ea7a93d86f@mail.gmail.com> <6AF150D1-1398-43CA-977A-3CF3D51719F4@ajf.me> <5b53012f7b5437d85cdf9972194aa34f@mail.gmail.com> <53C408EC.7080104@gmail.com> <5f491f470e902489f036102ae0f437f8@mail.gmail.com> In-Reply-To: <5f491f470e902489f036102ae0f437f8@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Scalar Type Hinting With Casts (re-opening) From: rowan.collins@gmail.com (Rowan Collins) Zeev Suraski wrote (on 14/07/2014): > I'd say absolutely yes, if they're PHP developers that's exactly what they'd > expect. After all, if you use 'hello' today in any integer context in PHP, > explicit or implicit, that's exactly how it will behavior across the > language. And yet if you use it as a parameter to a type hinted function, it will produce an error. You can be consistent with casts, or consistent with existing type hints, but not both. If the current type hints were only for objects, I would be OK with that, but I really don't get why an array cast is so different from an int cast.