[HOW TO] Convert tabs to spaces in Eclipse and File (in Linux)


Tux, the Linux penguin

This is a quick tip that helped me save a lot of time – this is the reason why I love LINUX because of it’s simplicity.

I was working on a legacy code (referred as old-age code – a simple procedural coding style) for a client. In general, coding standard suggests you to have spaces instead of tabs to make it look better in all kinds of IDE, we (generally every developer) uses tab key a lot (to make our life easier) thinking it gives us the space but it inserts an actual tab (which usually jobs off from one end to the other). This legacy code was filled with tabs which looked pretty ugly in our code-review tool, though it looks perfect in the IDE, when you try to open it in Linux the favorite VI editor it looks ugly YUCK it is.

HUH, initially when my folks reported me I was like yeah go ahead and change it – what’s a big deal. But then when I came to know it not just one file but a lot (yes a lot) – it was almost more than 100 files, which had tabs instead of spaces (not GOOD – yeah I know).

Continue reading “[HOW TO] Convert tabs to spaces in Eclipse and File (in Linux)”

[HOW TO] Convert tabs to spaces in Eclipse and File (in Linux)

ECHO or PRINT or ANYTHING – Can you tell me which is FASTER in PHP?


The PHP logo displaying the Handel Gothic font.
Image via Wikipedia

ECHO or PRINT which is faster? – You can see this kind of questions a lot in every PHP blog-space and most of the interview questions ;-). Most of us must be known the answer, Google it, you will ;-).

Yes you can say “ECHO” but how sure are you? We blindly believe on our experts, I agree I do a lot. But it feels something different when you see it on your naked eyes, don’t you? I do.

Recently while surfing (reading obviously) over the internet on various topics, I came across a nice tool which will exactly tell us WHO (language construct or pre-defined function) is GOOD in PHP.

Continue reading “ECHO or PRINT or ANYTHING – Can you tell me which is FASTER in PHP?”

ECHO or PRINT or ANYTHING – Can you tell me which is FASTER in PHP?