Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:32721 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 75692 invoked by uid 1010); 10 Oct 2007 13:46:53 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 75676 invoked from network); 10 Oct 2007 13:46:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Oct 2007 13:46:52 -0000 Received: from [127.0.0.1] ([127.0.0.1:9351]) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ECSTREAM id A2/D2-55062-BC7DC074 for ; Wed, 10 Oct 2007 09:46:51 -0400 X-Host-Fingerprint: 84.166.56.200 p54A638C8.dip0.t-ipconnect.de Received: from [84.166.56.200] ([84.166.56.200:21428] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2C/E0-51252-D52DB074 for ; Tue, 09 Oct 2007 15:11:26 -0400 Message-ID: <2C.E0.51252.D52DB074@pb1.pair.com> To: internals@lists.php.net Reply-To: "Sebastian" Date: Tue, 9 Oct 2007 21:12:05 +0200 Lines: 31 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2670 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 X-Posted-By: 84.166.56.200 Subject: new feature -> with() From: sebastian@ifyouwantblood.de ("Sebastian") hi, i think it would be really handy to introduce the with() feature from JavaScript (and probably other OOP languages) into php. so for sample the following --------------------------- $class=new class; $class->do_something(); $class->do_more(); $class->do(); --------------------------- could be made easier and more readable: --------------------------- $class=new class; with($class) { do_something(); do_more(); do(); } --------------------------- greetings Sebastian