Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #14461
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: $-sign in form input names? |
| Date | 2014-11-04 10:37 -0500 |
| Organization | A noiseless patient Spider |
| Message-ID | <m3ars5$jnk$1@dont-email.me> (permalink) |
| References | (1 earlier) <m398il$m28$1@dont-email.me> <cbr824Fmk87U1@mid.individual.net> <m3a5jf$7tf$1@solani.org> <m3ange$3mv$1@dont-email.me> <CoKdnecRCIyub8XJnZ2dnUU7-cudnZ2d@posted.internetamerica> |
On 11/4/2014 10:35 AM, Gordon Burditt wrote: >> That's one person's opinion - and his test is full of holes. For >> instance - a timing loop like he shows is worthless in a multitasking >> system. Too many other things are going on; even a timer interrupt >> during the loop can change timings. You need to have a clean machine >> (NOTHING else - including network, etc.) running to start. No >> paging/swapping. Even then such tests are suspect because you can't >> stop everything. Running on a single tasking system such as MS-DOS >> would be better, but still not necessarily accurate. > > There are workarounds to this. Run the test long enough that the > timer interrupts and other short disturbances will even out for > both test cases. For example, run the test for *A FULL YEAR* for > each case under test. > Yes, averaging a lot of runs will minimize the impact of external factors. But a small difference can still be incorrect. >> It's also only valid for one version of PHP - the one he's using. >> Different versions can operate differently. >> >> His whole argument is based on his statement: "I hold the opinion that >> microoptimization like that is just pointless.". Good programming >> practice is not microoptimization! > > I hold the opinion that even if the use of single quotes turns out > to be megapessimization, you should *still* use them. > > I'm going to argue that you should use single quotes for strings > that do not need string expansion even if the use of single quotes > makes the overall time to process the whole web page 100% *SLOWER*. > That's rather difficult, as presumably you actually *DO* something > with the string, such as outputting it to the web page, which will > take a lot longer than even badly written string parsing. > > It's a security and maintenance issue. A string containing a British > pound symbol won't cause any problem with string expansion. Port > it to a USA environment, making a mass substitution of the British > pound symbol to '$', and now string expansion may mess up your > string. If you don't have warnings turned on about the use of > undefined variables, this is a difficult error to spot. And it > might happen to hit a defined variable. Or PHP might add some > other substitution previously unknown. > Very good points, Gordon. >> I could go on, but the bottom line is - he is obviously biased, and his >> arguments are full of holes. I agree with J.O. - single quotes are >> better unless you need to parse the strings. > even if single quotes are measurably and significantly slower. > -- ================== Remove the "x" from my email address Jerry Stuckle jstucklex@attglobal.net ==================
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
$-sign in form input names? sonnichjensen@gmail.com - 2014-11-03 07:23 -0800
Re: $-sign in form input names? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-11-03 15:54 +0000
Re: $-sign in form input names? Denis McMahon <denismfmcmahon@gmail.com> - 2014-11-04 01:02 +0000
Re: $-sign in form input names? "J.O. Aho" <user@example.net> - 2014-11-04 06:55 +0100
Re: $-sign in form input names? "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-11-04 10:17 +0100
Re: $-sign in form input names? Jerry Stuckle <jstucklex@attglobal.net> - 2014-11-04 09:23 -0500
Re: $-sign in form input names? gordonb.2w35u@burditt.org (Gordon Burditt) - 2014-11-04 09:35 -0600
Re: $-sign in form input names? Jerry Stuckle <jstucklex@attglobal.net> - 2014-11-04 10:37 -0500
Re: $-sign in form input names? "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-11-04 21:42 +0100
Re: $-sign in form input names? Jerry Stuckle <jstucklex@attglobal.net> - 2014-11-04 17:01 -0500
Re: $-sign in form input names? "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-11-04 23:46 +0100
Re: $-sign in form input names? Jerry Stuckle <jstucklex@attglobal.net> - 2014-11-04 21:19 -0500
Re: $-sign in form input names? Matthew Carter <m@ahungry.com> - 2014-11-04 09:31 -0500
csiph-web