Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53137 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87114 invoked from network); 7 Jun 2011 13:28:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Jun 2011 13:28:52 -0000 Authentication-Results: pb1.pair.com smtp.mail=landeholm@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=landeholm@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.210.170 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: landeholm@gmail.com X-Host-Fingerprint: 209.85.210.170 mail-iy0-f170.google.com Received: from [209.85.210.170] ([209.85.210.170:58585] helo=mail-iy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4E/DA-30784-3972EED4 for ; Tue, 07 Jun 2011 09:28:52 -0400 Received: by iyb12 with SMTP id 12so5059677iyb.29 for ; Tue, 07 Jun 2011 06:28:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=HXhx8Yx8hdAqa6bPlXmOdzQCLNsE0ak8zIhtdGHPzTE=; b=lf3cJXmi4PTjzALq2AZmy99A5EBBa8bTW2PAFtIr7xQiFvVQnBOjZFSdfSLEbYEfub rZzG5NojYyGULDu6RKXavEAOepXmn25fxVHdHxk873RVZVC2lxygssd9m37aPfo+8emA K9spy2RHYWUte4VTix0OXj0IXu80T7YNuBlmI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=cBOeRd946Ydd0V6kVVVSYD5KZWa485mnTsc7fZTyqBWqQMsKpE43/23VSjLXgpxYns KLGipVbPmLstYWS31UW4bUnf/20b8WhcwPJMlUVc0n6il/rVec41YDtUNHIytjyxs4gv wm4GGBosUiQZKANQ/RGE7F8XPzLpwG1xMJu7A= MIME-Version: 1.0 Received: by 10.231.117.35 with SMTP id o35mr9819097ibq.149.1307453329392; Tue, 07 Jun 2011 06:28:49 -0700 (PDT) Received: by 10.231.33.66 with HTTP; Tue, 7 Jun 2011 06:28:49 -0700 (PDT) Date: Tue, 7 Jun 2011 15:28:49 +0200 Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary=00504501555142437b04a51f3379 Subject: Inline constructing/cloning and inline foreach listing From: landeholm@gmail.com (Hannes Landeholm) --00504501555142437b04a51f3379 Content-Type: text/plain; charset=ISO-8859-1 Hi, I like to do stuff "inline" instead of cluttering my code with variables. There are currently three syntaxes/expressions which are currently not supported but I hope could be implemented until 5.4. First inline constructing (which I think has already previously been discussed), but also cloning, e.g: // Inline constructing: $car = (new CarFactory())->makeCar(); // Inline cloning: $tomorrow = (clone $today)->add($one_day); I'd also like to iterate sets of arrays more "inline": (I'm not sure if this has been discussed before) foreach ($arrays as list($e1, $e2, $e3)) { ... // Instead of: foreach ($arrays as $array) { list($e1, $e2, $e3) = $array; Regards, Hannes --00504501555142437b04a51f3379--