Re: With End With
| From: | BDKR | Date: | Wed, 10 Dec 2003 21:28:30 +0000 |
| Subject: | Re: With End With | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-6339@lists.php.net to get a copy of this message | ||
walt boring wrote:
BDKR wrote:And we aren't even talking about nested With statements yet! Doh!jason davidson wrote: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')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. JasonSo 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
This is high on the yuk meterLOL! I agree 100%. I just had to write it out to visualize it. It doesn't visualize very well at all.
YukBDKR( /)W Cheers,