Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #6129
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | "Leonardo Azpurua" <leonardo@exmvps.org> |
| Newsgroups | comp.lang.php |
| Subject | Re: On the usage of "@" (error control operator) |
| Date | Wed, 23 May 2012 10:19:46 -0430 |
| Organization | A noiseless patient Spider |
| Lines | 45 |
| Message-ID | <jpitd2$bc8$1@dont-email.me> (permalink) |
| References | <jpio02$942$1@dont-email.me> <jpiq01$km7$1@dont-email.me> |
| Injection-Date | Wed, 23 May 2012 14:49:07 +0000 (UTC) |
| Injection-Info | mx04.eternal-september.org; posting-host="mwEy0s2LD/Fop7IgoIuFPw"; logging-data="11656"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19RRKALavl6kneLos2Lv9XXkmHJwC3q02w=" |
| X-MimeOLE | Produced By Microsoft MimeOLE V6.00.2900.2180 |
| X-RFC2646 | Format=Flowed; Response |
| X-Newsreader | Microsoft Outlook Express 6.00.2900.2180 |
| Cancel-Lock | sha1:n0xT2SMz2K2ieFgE5BRKTxwctxw= |
| X-Priority | 3 |
| X-MSMail-Priority | Normal |
| Xref | csiph.com comp.lang.php:6129 |
Show key headers only | View raw
"Jerry Stuckle" <jstucklex@attglobal.net> escribió en el mensaje news:jpiq01$km7$1@dont-email.me... >> [snip] >> Since an assigment is not an expression, the required syntax should be: >> >> $retVal = @$this->lastfetch[$ndx]; >> >> But both forms work. >> >> >> Is there any reason to prefer one above the other? >> >> -- >> >> > > My preference is to not use it at all and fix the error. > Hi, In this case there is no error to fix. I am writing (mostly for study purposes) a Web Interface to the reports of a business system of mine. This reports are generated from a user-generated script contained in a text file. Data items may come from several sources, like script defined variables, predefined variables, input parameters, database columns or script defined formulas. So, I must search an identifier in several associative arrays. And trying to access an array element with an invalid index triggers an error. An alternative would be to walk the array comparing each key with the desired identifier, but it means more code and, probably, less efficiency (even with the overhead of the @ operator). Anyway, any advice regarding a cleaner way to do this, will be very appreciated. Thanks!
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
On the usage of "@" (error control operator) "Leonardo Azpurua" <leonardo@exmvps.org> - 2012-05-23 08:47 -0430
Re: On the usage of "@" (error control operator) Jerry Stuckle <jstucklex@attglobal.net> - 2012-05-23 09:50 -0400
Re: On the usage of "@" (error control operator) "Leonardo Azpurua" <leonardo@exmvps.org> - 2012-05-23 10:19 -0430
Re: On the usage of "@" (error control operator) Jerry Stuckle <jstucklex@attglobal.net> - 2012-05-23 12:12 -0400
Re: On the usage of "@" (error control operator) "Leonardo Azpurua" <leonardo@exmvps.org> - 2012-05-23 14:15 -0430
Re: On the usage of "@" (error control operator) Jerry Stuckle <jstucklex@attglobal.net> - 2012-05-23 16:14 -0400
Re: On the usage of "@" (error control operator) Shake <QUITAESTO@QUITAESTO.NOES> - 2012-05-23 16:12 +0200
Re: On the usage of "@" (error control operator) "Leonardo Azpurua" <leonardo@exmvps.org> - 2012-05-23 10:22 -0430
Re: On the usage of "@" (error control operator) Shake <QUITAESTO@QUITAESTO.NOES> - 2012-05-23 17:11 +0200
Re: On the usage of "@" (error control operator) "Leonardo Azpurua" <leonardo@exmvps.org> - 2012-05-23 10:44 -0430
Re: On the usage of "@" (error control operator) Jerry Stuckle <jstucklex@attglobal.net> - 2012-05-23 12:13 -0400
Re: On the usage of "@" (error control operator) Thomas Mlynarczyk <thomas@mlynarczyk-webdesign.de> - 2012-05-24 22:26 +0200
csiph-web