1 - If we are talking about php code, it's irrelevant, in terms of size, using spaces or tabs, because they are not part of output.
2 - If, on other and, we are talking about html created by the php code, the case is completely different because output is parsed to the browser, so size will increase if we use tabs.


I use spaces for php code and tabs for html.

Jorge | cloreto.com

Chris Boget wrote:

Not exactly... I was not reffering to PHP files... The white spaces
from a template file will make double the size of certain files when
they are sent to the browser... So a page of 50 k might have 100 K
because of those white spaces instead of tabs... For a dial up
connection this means a lot even if you are not google...


can someone confirm this? this sounds totally wrong.


Why does it sound totally wrong? A tab is a single character whereas 2 spaces are 2 characters.

1 x 50k = 50k
2 x 50k = 100k

Try the following code:

echo str_repeat( " ", 50000 );

or

echo str_repeat( "\t", 50000 );

Chris




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



Reply via email to