Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77229 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91911 invoked from network); 15 Sep 2014 17:44:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Sep 2014 17:44:11 -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.173 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.173 mail-wi0-f173.google.com Received: from [209.85.212.173] ([209.85.212.173:55864] helo=mail-wi0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1D/E3-64534-A6527145 for ; Mon, 15 Sep 2014 13:44:11 -0400 Received: by mail-wi0-f173.google.com with SMTP id em10so4701259wid.0 for ; Mon, 15 Sep 2014 10:44:00 -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=Rlc6k6TTACdVOMw/C1SsGvcBXMVWvWVRTYE6ohlHVNg=; b=XOmZZUF/5K1s+whnqXpeDIM46Vm0oo2keHoXk+06tTpQ0BD5aEXbHL/rQfIqVPaKVZ 42E48YArL0arYplmjiubS1TK2IowgaORccJdfGEtWwVNslJuUVP6tKmICZtnBm7l1Ioj /jsaJdcjQ5US+x/tycI+QqsrtgbXXQHm5FezFkqbI2uqqrCWAh1oBMhhqwiwRzmtBKLt vUfApBMoUE9KKy54KRZwF3hA2eTu9TU4vgfPhBFWYnrvnxB3uAtXCJ6GR43OTr0eOxXA nHkTO/6bTjSqD5+sz/fW+bKbko3OWjErvV93lIZKPirFAI1+ggrm/R/kTAKfkPgx+ebP eR1w== X-Received: by 10.194.71.210 with SMTP id x18mr34222879wju.6.1410803040178; Mon, 15 Sep 2014 10:44:00 -0700 (PDT) Received: from [192.168.0.177] ([62.189.198.114]) by mx.google.com with ESMTPSA id cj7sm15515037wjc.37.2014.09.15.10.43.58 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 15 Sep 2014 10:43:59 -0700 (PDT) Message-ID: <5417255B.4010109@gmail.com> Date: Mon, 15 Sep 2014 18:43:55 +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: PHP internals References: <6893A97A-EC4C-4124-B804-96E2A26B953F@ajf.me> <20140914000718.GB14312@phcomp.co.uk> <3177B936-50C1-4E5D-8687-FD235C72B411@ajf.me> <54153692.7050500@sugarcrm.com> <9CE963B0-E624-4267-BC2A-0F8D1F985DAE@ajf.me> <6f2236e18c61d30b247e1c6bb2de10f1@mail.gmail.com> <8556C1E7-EDF3-47E2-9DA0-C9AB63DE56E6@ajf.me> <6E402FE8-119A-4BBB-B652-97A0DBEC8BC9@ajf.me> <5415DC76.7070105@gmail.com> <54167CDC.9040801@sugarcrm.com> <5416D224.10709@gmail.com> <54171CA0.5000404@sugarcrm.com> In-Reply-To: <54171CA0.5000404@sugarcrm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [VOTE][RFC] Scalar Type Hinting with Cast From: rowan.collins@gmail.com (Rowan Collins) Stas Malyshev wrote (on 15/09/2014): > Hi! > >> I agree that 100% is an unrealistic goal, but I don't think I've yet >> seen someone actually point at a documented set of rules that even 80% >> of current functions follow. I guess there is a default/normal usage of > The rules are in zpp, and every function that uses zpp automatically > follows them. > For those of us that aren't fluent in C, it would be great if someone could document those rules, or point at a readable piece of code which is specifically relevant to this discussion. As I understand it, it's also not quite true to say that everything automatically follows them, since functions can a) react how they want to a "failure" of ZPP, and b) perform any extra checks and conversions they want in addition to ZPP. From an engine perspective, the rules of ZPP itself may seem like a single unit, but from a userland PoV, the function's overall behaviour that is a "black box". Please correct me if I've misunderstood that. Regards, -- Rowan Collins [IMSoP]