Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:55749 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37261 invoked from network); 8 Oct 2011 10:03:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Oct 2011 10:03:05 -0000 Authentication-Results: pb1.pair.com smtp.mail=frederic.hardy@mageekbox.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=frederic.hardy@mageekbox.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain mageekbox.net from 217.70.183.196 cause and error) X-PHP-List-Original-Sender: frederic.hardy@mageekbox.net X-Host-Fingerprint: 217.70.183.196 relay4-d.mail.gandi.net Linux 2.6 Received: from [217.70.183.196] ([217.70.183.196:50334] helo=relay4-d.mail.gandi.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D2/60-34277-7DF109E4 for ; Sat, 08 Oct 2011 06:03:03 -0400 X-Originating-IP: 217.70.178.134 Received: from mfilter4-d.gandi.net (mfilter4-d.gandi.net [217.70.178.134]) by relay4-d.mail.gandi.net (Postfix) with ESMTP id 5070F172089; Sat, 8 Oct 2011 12:03:00 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter4-d.gandi.net Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by mfilter4-d.gandi.net (mfilter4-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id NtsIU2HxIytw; Sat, 8 Oct 2011 12:02:59 +0200 (CEST) X-Originating-IP: 78.224.200.11 Received: from [192.168.0.13] (oul69-5-78-224-200-11.fbx.proxad.net [78.224.200.11]) (Authenticated sender: frederic.hardy@mageekbox.net) by relay4-d.mail.gandi.net (Postfix) with ESMTPA id C2D2F17208B; Sat, 8 Oct 2011 12:02:57 +0200 (CEST) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=iso-8859-1 In-Reply-To: Date: Sat, 8 Oct 2011 12:02:57 +0200 Cc: "internals@lists.php.net" Content-Transfer-Encoding: quoted-printable Message-ID: References: <4E5B24DD.10903@sugarcrm.com> <4E671355.5060908@sugarcrm.com> To: Gustavo Lopes X-Mailer: Apple Mail (2.1084) Subject: Re: [PHP-DEV] 5.4 beta From: frederic.hardy@mageekbox.net (=?iso-8859-1?Q?Fr=E9d=E9ric_Hardy?=) Hello ! > I don't think so, but if I had to summarize the innovations in 5.4, = this would be it: >=20 > - Closures can now have an associated scope > - Closures can now have a bound object > - Closures can now be either static or non-static >=20 > - Closures defined in a place with an active scope are scoped = accordingly > - Closures defined inside an instance method (or bound closure) have a = bound object (namely $this) > - Closures are static if defined within a static method or with the = static keyword (static function() { ... }) Is it possible to have sample code about these ? They will be very interesting to understand the RFC correctly and write = documentation or tutorial. For example, i was tryed to use $this in a closure with PHP 5.B beta = without any success :/, so if using $this in a closure is possible, i = would like to know how to do it.. Best regards, Fred -- =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Fr=E9d=E9ric Hardy : Architecte d'application/Admin. syst=E8me/Ergonome CV : = http://blog.mageekbox.net/public/cv.frederic.hardy.pdf Blog : http://blog.mageekbox.net Twitter : http://twitter.com/mageekguy =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D