Page 3 of 3

Posted: Sat Aug 26, 2006 4:43 pm
by feyd
Keep it civil.. even jokingly, that's not very nice ole.

Posted: Sat Aug 26, 2006 4:55 pm
by Oren
Just ran your code bokehman, but the PHP 5 version.
Without error suppression it was 4.2 - 4.7 times faster than with error suppression.
I also tested with $fake = true; to see what happens in that case.

The result:

"Without error suppression is 2.7 times faster than with error suppression".

Posted: Sat Aug 26, 2006 4:55 pm
by Ollie Saunders
feyd wrote:Keep it civil.. even jokingly, that's not very nice ole.
Fixed

Posted: Sat Aug 26, 2006 5:54 pm
by bokehman
Oren wrote:I also tested with $fake = true; to see what happens in that case.
I was trying to cut down on the work done to keep the overhead to a minimum and hopefully be timing the error suppression and little else. On my laptop it returns 11.4 while on my production server it returns 8.2.

Posted: Sat Aug 26, 2006 6:09 pm
by Oren
Well, it doesn't really matter - the conclusion is pretty obvious :P

Posted: Wed Aug 30, 2006 9:26 pm
by Ollie Saunders
I would like to add something here. @ has just saved my ass.
I wrote:Never use @. Ever.
This isn't true. There is no such thing as never in programming, I was being a cock. There is uncredibly rare, but not never. Anyway I experienced an incredibly rare occasion just now as this code snippet will demonstrate:

Code: Select all

$needle = 'something';
$haystack = ''; // nothing
strrpos($needle, $haystack);
mb_strrpos($needle, $haystack); // generates an E_WARNING telling you that your haystack is empty
mb_strrpos should definately not trigger errors but alas is does and the best solution is @.
So there you have it. :D