Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:6339 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 549 invoked by uid 1010); 10 Dec 2003 21:28:31 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 401 invoked from network); 10 Dec 2003 21:28:31 -0000 Received: from unknown (HELO cedar.phpwebhosting.com) (66.132.144.42) by pb1.pair.com with SMTP; 10 Dec 2003 21:28:31 -0000 Received: (qmail 430 invoked from network); 10 Dec 2003 21:28:29 -0000 Received: from unknown (HELO highsidecafe.com) (65.40.44.13) by cedar2.phpwebhosting.com with SMTP; 10 Dec 2003 21:28:29 -0000 Message-ID: <3FD78FFE.2060802@highsidecafe.com> Date: Wed, 10 Dec 2003 16:28:30 -0500 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031013 Thunderbird/0.3 X-Accept-Language: en-us, en MIME-Version: 1.0 To: internals@lists.php.net References: <3FD67054.2030000@zworg.com> <3FD762B5.1080908@highsidecafe.com> <3FD7669D.8030601@3gstech.com> In-Reply-To: <3FD7669D.8030601@3gstech.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] With End With From: bdkr@highsidecafe.com (BDKR) walt boring wrote: > 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') And we aren't even talking about nested With statements yet! Doh! > > This is high on the yuk meter LOL! I agree 100%. I just had to write it out to visualize it. It doesn't visualize very well at all. > > Yuk > ( /) > > W > Cheers, BDKR