Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50594 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 50956 invoked from network); 26 Nov 2010 20:00:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Nov 2010 20:00:58 -0000 Authentication-Results: pb1.pair.com smtp.mail=parasane@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=parasane@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: parasane@gmail.com X-Host-Fingerprint: 209.85.214.42 mail-bw0-f42.google.com Received: from [209.85.214.42] ([209.85.214.42:34326] helo=mail-bw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EC/0E-61791-9F110FC4 for ; Fri, 26 Nov 2010 15:00:58 -0500 Received: by bwz13 with SMTP id 13so2186633bwz.29 for ; Fri, 26 Nov 2010 12:00:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=lr0ayM3/CxXgIMWBQ3unNJTOe47VN5+hvubI0Luaw2E=; b=F30l3mpcbKej3NaGzV1p8SGxAyy7GV6rp14+QxSk+YcJUN/oeQYEAoaw9+SrGqnP93 Mn/UAwe+o4CVyZCsNR8gaiJvlHmgRAmQHX+dJRlWGf4aF5q5+LNImRxl761oc9YWAxrl fp+IHshPJo9oFYoDhcrwARHCVCTLP43KVMPzg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=g2dRHyGYGRr8LmncX6NZeslYCcJvpPf8hrESvCrVnnglFFJvWHgnABM86WLjN3QmAj 6qCH4digkFetAtScN7OzJRKPq9OcLHkHz4oluaezpb06C+uBEAzM6WMvUa0O/eJ1yoBu 3K/Bj2bKHjMtvi8Uj5ny2zz504zss+2vQEB/U= Received: by 10.204.100.2 with SMTP id w2mr2225569bkn.152.1290801654504; Fri, 26 Nov 2010 12:00:54 -0800 (PST) MIME-Version: 1.0 Sender: parasane@gmail.com Received: by 10.204.100.77 with HTTP; Fri, 26 Nov 2010 12:00:33 -0800 (PST) In-Reply-To: References: Date: Fri, 26 Nov 2010 15:00:33 -0500 X-Google-Sender-Auth: 5fXizRXM1vtVugMONY0vxTubMUM Message-ID: To: Felipe Pena Cc: internals Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] new foo()->bar() From: danbrown@php.net (Daniel Brown) On Fri, Nov 26, 2010 at 14:36, Felipe Pena wrote: > Hi all, > I'm here again to presents another proposal, which adds support for > instantiating a class and calling its methods and accessing its propertie= s > on same command. > > Example: > > > class bar { > =A0public $x =3D 'PHP'; > } > > class foo extends bar { > =A0public function bar() { > =A0 =A0return $this; > =A0} > } > > var_dump(new foo()->bar()->x); // string(3) "PHP" > > ?> > > Other examples which describes the feature at > http://wiki.php.net/rfc/instance-method-call > > Thoughts? I'm all for it, Felipe. Chaining like that would really come in handy in several situations of which I can think right off the top of my head even. --=20 Network Infrastructure Manager Documentation, Webmaster Teams http://www.php.net/