Just asking for a second opinion on my theory.
Say I have 5 cases in a switch statement. And for each case I have a block of 1kb of code. Now if all this code was contained in this page I'd have a 5kb sized php document.
Now say I put my 1kb cases in separate pages and include them via include ()
This would make my main page ~ 1-2 kb. Would this make my page load faster?
The reasoning is 1. the page is smaller and 2. The 4 cases that aren't executed wont include the block of text at all ... ??
What do you guys think ?
Oh yeah and while I'm posting, if php is so good, and free, and powerful, why use any other server side? Obviously for the sake of choice/variety or something, but does any other code have any major advantages ?
Thanks



Reply With Quote

It has little in the way of standardisation of function names (for example, mysql_select_db and fsockopen); it lacks the object-orientation of other languages (although in fairness to it, it does seem to be trying now); and it's slow. People complain about the speed of Java, but according to several benchmarks, PHP is far slower.
Bookmarks