--- brad lafountain <[EMAIL PROTECTED]> wrote: > > --- [EMAIL PROTECTED] wrote: > > From: [EMAIL PROTECTED] > > Operating system: N/A > > PHP version: 4.1.1 > > PHP Bug Type: Feature/Change Request > > Bug description: A C-like comma operator would be useful > > > > A C-like comma operator would be useful, to string together series of > > statements. > > > > Example: > > > > echo ( $precondition > > ? ( doThisAndDiscardReturnValue(), > > andDoThisAndReturnReturnValue() ) > > : doSomethingElseAndReturnReturnValue() ); > how about > > echo ($precondition ? ( doThisAndDiscardReturnValue() && > andDoThisAndReturnReturnValue() ) : doSomethingElseAndReturnReturnValue() ); sorry i guess i didn't read that good enough but then it makes less to me why you would wanna do that!!!!! becaues you always want doThisAndDiscardReturnValue() to execute. so why wouldn't you call it before you do you echo.. i would think your example would just be poor programming construct!
this would work, doThisAndDiscardReturnValue(); echo ($precondition ? andDoThisAndReturnReturnValue() : doSomethingElseAndReturnReturnValue() ); > > this should work! > > > -- > > Edit bug report at: http://bugs.php.net/?id=15328&edit=1 > > > > > > -- > > PHP Development Mailing List <http://www.php.net/> > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > __________________________________________________ > Do You Yahoo!? > Great stuff seeking new owners in Yahoo! Auctions! > http://auctions.yahoo.com > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > __________________________________________________ Do You Yahoo!? Great stuff seeking new owners in Yahoo! Auctions! http://auctions.yahoo.com -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]