Twin Functions

Well, this was what I thought when I was first introduced to PHP. Almost every library function seemed to have a duplicate. But my title itself is wrong. They are not at all identical.

Take for instance

1) str_replace() and preg_replace()
2) join() and implode()
3) split(), preg_split() and explode()

Continue reading

Optimizing SQL for better performance

One of the basic nightmares of a web developer is optimizing queries. Every now and then, I keep seeing articles which advise lesser queries per web page, normalised tables, indexes on the most queried columns and a diligent logic.

Ofcourse, this is what is needed. But at the same time, not everyone is exposed to better optimization techniques. If you are one of those, who have written a perfect SQL but still wondering why it takes that longer for it to get executed, read on.

Continue reading