Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #14456
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: $-sign in form input names? |
| Date | 2014-11-04 09:23 -0500 |
| Organization | A noiseless patient Spider |
| Message-ID | <m3ange$3mv$1@dont-email.me> (permalink) |
| References | <996e3930-f711-4338-9093-07115af47380@googlegroups.com> <m398il$m28$1@dont-email.me> <cbr824Fmk87U1@mid.individual.net> <m3a5jf$7tf$1@solani.org> |
On 11/4/2014 4:17 AM, Christoph M. Becker wrote: > J.O. Aho wrote: > >> As the double quotes will make the string to be parsed every time, which >> causes some slight overhead. > > But see > <http://nikic.github.io/2012/01/09/Disproving-the-Single-Quotes-Performance-Myth.html>. > 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. 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! And the killer is this statement: "Now some may argue: PHP is an interpreted language, so compile time actually also happens at runtime. My response to that would normally be: Use APC." That MAY be find if you're running your own server. But most people aren't, and APC is not available to him. 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. -- ================== 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