Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:43669 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 12350 invoked from network); 13 Apr 2009 08:03:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Apr 2009 08:03:56 -0000 Authentication-Results: pb1.pair.com smtp.mail=pcd@roxygen.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=pcd@roxygen.org; sender-id=unknown Received-SPF: error (pb1.pair.com: domain roxygen.org from 72.51.35.14 cause and error) X-PHP-List-Original-Sender: pcd@roxygen.org X-Host-Fingerprint: 72.51.35.14 klutometis.wikitex.org Linux 2.6 Received: from [72.51.35.14] ([72.51.35.14:58525] helo=klutometis.wikitex.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C4/72-31755-BE1F2E94 for ; Mon, 13 Apr 2009 04:03:56 -0400 Received: from klutometis.wikitex.org (localhost.localdomain [127.0.0.1]) by klutometis.wikitex.org (8.13.1/8.13.1) with ESMTP id n3D83qwK010590; Mon, 13 Apr 2009 03:03:52 -0500 Received: (from pcdanenb@localhost) by klutometis.wikitex.org (8.13.1/8.13.1/Submit) id n3D83qxS010589; Mon, 13 Apr 2009 03:03:52 -0500 Date: Mon, 13 Apr 2009 03:03:52 -0500 To: Justin Martin Cc: internals@lists.php.net Message-ID: <20090413080352.GA10458@klutometis.wikitex.org> References: <20090412025100.GA5493@klutometis.wikitex.org> <8B.71.31755.246E2E94@pb1.pair.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8B.71.31755.246E2E94@pb1.pair.com> X-Fnord: I have seen the fnords. User-Agent: Mutt/1.5.16 (2007-06-11) Subject: Re: [PHP-DEV] Re: Closures and __FUNCTION__ From: pcd@roxygen.org (Peter Danenberg) Quoth Justin Martin on Pungenday, the 30th of Discord: > If I recall correctly, you can use the 'use' keyword. Thanks, Justin; that occurred to me, too. But the following results in "Notice: Undefined variable: factorial": $factorial = function($n) use ($factorial) { if ($n == 1) return 1; else return $n * $factorial($n - 1); }; print $factorial(3); and eventually "PHP Fatal error: Function name must be a string."