Re: two questions on serverside validation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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,
Ash


Agreed.

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/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux