On May 20, 2011, at 4:41 AM, Tim Streater wrote:

> On 20 May 2011 at 04:03, Alex Nikitin <niks...@gmail.com> wrote: 
> 
>> but here is a brief example:
>> 
>> (!DEBUG) || error_log("Fetch Data: ".memory_get_usage()/1048576);
>> 
>> reads and writes a lot better and faster then:
>> 
>> if(DEBUG) {
>>   $memory = memory_get_usage()/1048576;
>>   error_log("Fetch Data: ".$memory);
>> }
> 
> Not to me it doesn't. I find such usage incomprehensible.
> 
> tim

I understand what you're doing, and I think it's a bad shortcut to be taking. 
Make a dedicated class for logging and handle all this there. 

Regards,

-Josh
____________________________________
Joshua Kehn | josh.k...@gmail.com
http://joshuakehn.com


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

Reply via email to