Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86775 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64663 invoked from network); 21 Jun 2015 22:11:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Jun 2015 22:11:11 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.44 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.220.44 mail-pa0-f44.google.com Received: from [209.85.220.44] ([209.85.220.44:33848] helo=mail-pa0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 36/61-57034-E7637855 for ; Sun, 21 Jun 2015 18:11:10 -0400 Received: by pabvl15 with SMTP id vl15so74375654pab.1 for ; Sun, 21 Jun 2015 15:11:07 -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:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=VF4uIoyuBtmjLjKdCUyHqo3M0IRsp88ufGmvg5eZLKw=; b=JWPK2SXN1mGtx92DBEGCSeKyg7wBSn+SBUk3xeEbiHJAvv3Zm+rgUE3Cf9iDUA0wae otp6QBErZDFMYoFgBKpy/e5cFRahuwmHk5Yu1MuYHggP+ZWCc5XA0FIrLTN72Kpwy/kA exUJMlwZlXGQyTl8DO2bxHhkTzmDeEj3a0lIN2Y3ESCaxM7kxOt1i4LtWJD6l1S3HUkJ 8wGHDu2+95MmsC7Ly/eBUrs1ru//OJEUWgFCOQfq3d8vBMTozPob7vxfhBl8Lmp6zQ6C ZEHo5iJzPT7kSkxLPUq+fys9Is/WCBDI1LcGd6ZsUwesBD48CjhRaFv54rXo9Qiku9l0 9BiA== X-Received: by 10.67.23.44 with SMTP id hx12mr53454875pad.16.1434924667229; Sun, 21 Jun 2015 15:11:07 -0700 (PDT) Received: from Stas-Air.local (108-66-6-48.lightspeed.sntcca.sbcglobal.net. [108.66.6.48]) by mx.google.com with ESMTPSA id f15sm15241090pdk.45.2015.06.21.15.11.06 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Jun 2015 15:11:06 -0700 (PDT) Message-ID: <55873676.6050706@gmail.com> Date: Sun, 21 Jun 2015 15:11:02 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Nikita Popov , Rasmus Lerdorf CC: Kalle Sommer Nielsen , PHP internals References: <5586E5D1.4010901@lerdorf.com> <55870947.4060304@lerdorf.com> <5587334C.2080401@lerdorf.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] hasType() for internal function parameters? From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > Before making more extensive use of arginfo types, I think we should first > do some adjustments to the way they are handled. In particular adding types > means that internal fcalls will take the branch in > http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_vm_def.h#3669. As this is hot > code, it is likely important to avoid doing those duplicate type checks > (that will also happen in zpp anyway). As such I would suggest to make > arginfo for internal functions reflection-only. Return type hints are > already only enforced in debug mode. Agreed, for internals arginfo types should be reflection-only. I imagine that would be very easy to fix just by checking for function type? -- Stas Malyshev smalyshev@gmail.com