Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:6336 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43094 invoked by uid 1010); 10 Dec 2003 18:37:00 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 43060 invoked from network); 10 Dec 2003 18:37:00 -0000 Received: from unknown (HELO mail.3gstech.com) (216.239.132.110) by pb1.pair.com with SMTP; 10 Dec 2003 18:37:00 -0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.3gstech.com (Postfix) with ESMTP id 70A6E9E76B5; Wed, 10 Dec 2003 10:36:59 -0800 (PST) Received: from mail.3gstech.com ([127.0.0.1]) by localhost (fungus [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 09661-04; Wed, 10 Dec 2003 10:36:59 -0800 (PST) Received: from 3gstech.com (ip-209-172-92-41.us01.qualys.com [209.172.92.41]) by mail.3gstech.com (Postfix) with ESMTP id 2F0E89E76AA; Wed, 10 Dec 2003 10:36:59 -0800 (PST) Message-ID: <3FD7669D.8030601@3gstech.com> Date: Wed, 10 Dec 2003 10:31:57 -0800 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 MultiZilla/1.6.0.0a X-Accept-Language: en-us, en MIME-Version: 1.0 To: BDKR Cc: internals@lists.php.net References: <3FD67054.2030000@zworg.com> <3FD762B5.1080908@highsidecafe.com> In-Reply-To: <3FD762B5.1080908@highsidecafe.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] With End With From: waboring@3gstech.com (walt boring) BDKR wrote: > jason davidson wrote: > >> Ive seen the Control Flow constuct With ...End With used in VB (yup, >> VB.. :)) although im not a fan of VB, i liked the feature, is there >> any consideration to this kind of construct for php. >> here the only example if it i could find online for anyone that hasnt >> seen it before. >> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcn7/html/vaconusingwith.asp >> >> Aside from being VB, is there anything wrong with it. >> >> Jason >> > So how would that look in PHP? Something like? > > With $dbObject; > if(->doConnect()==true) > { > ->doQuery(); > while($row = ->fetchArray()) > { /* do something with returned row */ } > } > End With: > > Just a question from an onlooker. > > Cheers, > BDKR > yuk! This would start php down the slippery slope of unreadable code...et all perlisms. no thanks. Just think of a large block of code and 30 lines down all you had was ->$foo = blah; or ->something('foo') This is high on the yuk meter Yuk ( /) W