Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:34045 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 68410 invoked by uid 1010); 16 Dec 2007 11:24:32 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 68395 invoked from network); 16 Dec 2007 11:24:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Dec 2007 11:24:32 -0000 Authentication-Results: pb1.pair.com header.from=troelskn@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=troelskn@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.198.184 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: troelskn@gmail.com X-Host-Fingerprint: 209.85.198.184 rv-out-0910.google.com Received: from [209.85.198.184] ([209.85.198.184:14683] helo=rv-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0F/08-30742-5EA05674 for ; Sun, 16 Dec 2007 06:24:26 -0500 Received: by rv-out-0910.google.com with SMTP id k15so1481720rvb.23 for ; Sun, 16 Dec 2007 03:24:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=47Nd5fNaAPBcbX5ckgW9v3ylCr16qvIxDNJad7PGzBw=; b=mAMSo9Nnk/VSi5Cg16bt3P0f6qn8ftPtFyV6TmTql/jTseA8DR5UI6vmqkNwey7foO/Pmr+En+pKSRcZW6yu88/fVOc7ckoO7h34LLam0xgxdJikbH4sx47rDMU3xcylgJV4P1SdrkXAs51JGYDdqTViV0t/5gKMwoWBcighiKI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=eLQfTl4ZwLGJqJVZDxHifxcv0lM8whtzAr9vFKo0ce7aUq6XKJjwwanZtNMP5vCCUVXM9iEtzVwPFmpY1Dae/hXnjWLnD2Tc5QTK10FWqczQJvP3y481MfnftRIPy9Aebzz8kEpUquxl7cglvdw0yIf6nv/XTBnkLwNPuvle0bk= Received: by 10.141.23.7 with SMTP id a7mr1186176rvj.58.1197804257684; Sun, 16 Dec 2007 03:24:17 -0800 (PST) Received: by 10.141.50.16 with HTTP; Sun, 16 Dec 2007 03:24:17 -0800 (PST) Message-ID: <98b8086f0712160324n653bbb61v17fbf1d364ae3b51@mail.gmail.com> Date: Sun, 16 Dec 2007 12:24:17 +0100 To: internals@lists.php.net In-Reply-To: <4764CC64.3040608@zend.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <98b8086f0712150818n40056cedyf0aae7a5a08a27b7@mail.gmail.com> <4764CC64.3040608@zend.com> Subject: Re: [PHP-DEV] Re: PATCH: anonymous functions in PHP From: troelskn@gmail.com ("troels knak-nielsen") Actually it's the opposite. With create_function, you can bind variables, by marshalling them to a string and embed them in the function-definition. With a static syntax, this isn't possible. However, this is only a problem, when you need to bind variables, which isn't always the case and even then, there are other ways to bind variables in runtime. So it's different from create_function, in that it doesn't allow binding of variables, but I don't see why that should stop us from implementing, considering the benefits it gives in readability and debugging. -- troels On Dec 16, 2007 7:57 AM, Stanislav Malyshev wrote: > I think the problem there is that this syntax wouldn't support external > variables, and without them there's not much difference between that and > create_function. > > > troels knak-nielsen wrote: > > What was the conclusion on Wez' patch from march [1]? The discussion > > seemed to steer a bit off, on the discussion of scoping rules, but is > > there any reason _not_ to implement Wez' patch in HEAD? > > Even if it doesn't entirely replace create_function, it would be nice > > to have as a compile-time alternative. > > > > [1] http://groups.google.com/group/mailing.www.php-dev/browse_thread/thread/a2c3296dc791369a/075209b288cb28de > > > > -- > Stanislav Malyshev, Zend Software Architect > stas@zend.com http://www.zend.com/ > (408)253-8829 MSN: stas@zend.com >