Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49362 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 75512 invoked from network); 11 Aug 2010 18:32:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Aug 2010 18:32:55 -0000 Authentication-Results: pb1.pair.com smtp.mail=kalle.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=kalle.php@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.161.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: kalle.php@gmail.com X-Host-Fingerprint: 209.85.161.42 mail-fx0-f42.google.com Received: from [209.85.161.42] ([209.85.161.42:55686] helo=mail-fx0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 86/7D-01618-6DCE26C4 for ; Wed, 11 Aug 2010 14:32:54 -0400 Received: by fxm14 with SMTP id 14so407250fxm.29 for ; Wed, 11 Aug 2010 11:32:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=TulN+r/BfX2HrLyILGdUjZUEmG9wjLUkfWx3b+/H9j4=; b=Ew5pTVHpAJTHzV7dEfpBhxoAa0soUQCNZcYgQpP1P7SoQtphUbFk+uREYLWuus+MlM g6WOnljrzYfQcLZAJyHYQStzsSGrtSA9OZFiGOFGfp3G4QLudG7CbPKJT/H5JOBlSI/2 4Md0t5Tj+OZXnwuIA+n60tYoFpVo2mJ0NMT98= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=HOpK+a6ZkbgZ9UY7zVWq0HwHmJ1QXYLn27RZ1dVrFz5qyhRNexScbvvVsgj+qe3jBN fHJIOoADomu3MuS2pmZFelf7h3CA13u7r7csSPjbGYpB98uL8QltyMuu4TASt4nmx+lm yodWZWbRH6bgGMHxmUjhETFXVtpDBhzkDwdi0= MIME-Version: 1.0 Received: by 10.223.119.147 with SMTP id z19mr20585205faq.64.1281551570386; Wed, 11 Aug 2010 11:32:50 -0700 (PDT) Sender: kalle.php@gmail.com Received: by 10.223.64.145 with HTTP; Wed, 11 Aug 2010 11:32:50 -0700 (PDT) In-Reply-To: <4C62E9ED.8010400@sugarcrm.com> References: <1281478269.6608.292.camel@guybrush> <4C61D6D0.90907@sugarcrm.com> <4C62B9E0.4030305@gmail.com> <1281540200.1132.36.camel@guybrush> <4C62C957.8040403@gmail.com> <4C62E9ED.8010400@sugarcrm.com> Date: Wed, 11 Aug 2010 20:32:50 +0200 X-Google-Sender-Auth: s_wED_FbsjoSYVpWFX5kxrNCWbE Message-ID: To: Stas Malyshev Cc: Elizabeth M Smith , Internals Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: params ext (was: Strict typing) From: kalle@php.net (Kalle Sommer Nielsen) Hi 2010/8/11 Stas Malyshev : > I like the idea, though it looks like this function is a re-implementation > of the engine parsing, which is not good. The function that actually reuses > the engine function would be much better. I did have a short peak at the code and yes I belive we could implement such a function relatively more simple than pecl/params > Ahother thing - for core I think it has to be named something like > func_parse_args() to be in line with func_get_args() etc. and some error > feedback (like, which parameter failed and why) wouldn't hurt. I thought the same, and then implementing it in zend_builtin_functions in line with the other func_*() utilities. > But having such thing in core would be very nice. Though it wouldn't solve > the current debate about types/params, since the whole idea is for it to > work without calling additional functions. Indeed it doesn't solve the current arguments for and against type hinting. But its a good step in the right direction for a better way to parse passed parameters from a library developer perspective. -- regards, Kalle Sommer Nielsen kalle@php.net