Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97351 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 33967 invoked from network); 10 Dec 2016 09:20:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Dec 2016 09:20:41 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@ohgaki.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@ohgaki.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ohgaki.net designates 180.42.98.130 as permitted sender) X-PHP-List-Original-Sender: yohgaki@ohgaki.net X-Host-Fingerprint: 180.42.98.130 ns1.es-i.jp Received: from [180.42.98.130] ([180.42.98.130:40776] helo=es-i.jp) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 23/03-12501-0E8CB485 for ; Sat, 10 Dec 2016 04:20:35 -0500 Received: (qmail 20763 invoked by uid 89); 10 Dec 2016 09:20:29 -0000 Received: from unknown (HELO mail-wm0-f43.google.com) (yohgaki@ohgaki.net@74.125.82.43) by 0 with ESMTPA; 10 Dec 2016 09:20:29 -0000 Received: by mail-wm0-f43.google.com with SMTP id g23so6971381wme.1 for ; Sat, 10 Dec 2016 01:20:28 -0800 (PST) X-Gm-Message-State: AKaTC03slQK43Agg2UQMhR5Sr6oJm6C/YontfsBlkzer62zYUoLdlDAGiSdsjPVmRVgI7+OSNzMthCV90f4Qqw== X-Received: by 10.28.67.69 with SMTP id q66mr1603241wma.22.1481361621912; Sat, 10 Dec 2016 01:20:21 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.38.7 with HTTP; Sat, 10 Dec 2016 01:19:41 -0800 (PST) In-Reply-To: References: Date: Sat, 10 Dec 2016 18:19:41 +0900 X-Gmail-Original-Message-ID: Message-ID: To: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: Internal function/method data type validation practice? From: yohgaki@ohgaki.net (Yasuo Ohgaki) On Thu, Dec 8, 2016 at 10:34 AM, Yasuo Ohgaki wrote: > What's the best practice of internal function and method data type > validation, both parameter and return types? > > Although it seems it is possible to retrieve parameter/return types, > there is no APIs defined in Zend according to ext/reflection or I must > have missed something. > > Thank you. It seems there isn't clean and easy way to introspect and validate parameters and return type currently. I'll forget about validating to be registered callback functions/methods parameter and return type for the time being. If you have suggestions, I appreciate it. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net