Re: two questions on serverside validation
| From: | tedd | Date: | Thu, 26 Aug 2010 13:22:48 +0000 |
| Subject: | Re: two questions on serverside validation | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-307693@lists.php.net to get a copy of this message | ||
At 3:59 PM +0100 8/25/10, Ashley Sheridan wrote:
2.4 seconds doesn't seem so bad on 10 million iterations, but yes, it does show that you should avoid it if it's really not necessary. Most often I'll use that sort of syntax if I do something like this: $greeting = "Hello $name, not seen you since $date"; which might be slower than: $greeting = 'Hello ' . $name . ', not seen you since ' . $date; but it is a whole lot neater and still gets syntax highlighting applied in a decent IDE or editor. Thanks, AshAgreed. Making things easy for both you and the programmer who follows is more important than cutting a few nanoseconds off compute time. After all, just displaying that information (i.e., echo) will take far more time and even vary more than that between monitors. Cheers, tedd -- ------- http://sperling.com/