
July 23rd, 2006
05:14 AM
Lost in Berkeley, CA
Status: Offline!
Originally posted by phpmonkey:
Originally posted by TheClincher:
2. would it save bandwidth to place all my php functions in a seperate .php file and just include that file on the pages that need it?
yes, and it wuold also be convenient, kind of like including a css
Uhm. No? You would *not* save bandwidth by using includes.
so... it's not like css
still convenient tho
___________________
There is no theory of evolution. Just a list of creatures Chuck Norris has allowed to live.
Last edited by TheClincher, July 23rd, 2006 05:17 AM (Edited 1 times)

July 23rd, 2006
11:19 PM
Neverside Newbie
Status: Offline!
No matter how you do it (unless you compress the output) you wont be saving any bandwidth by moving any of your code to php. also by putting your html code into php files and echoing out the html unless you are actualy doing anything there may be pretty pointless and may use server resources that you may not actualy need...
even just <?php "hello world" ?> would consume more resources than just the server sending the html file taht contains "hello world".
In short if you dont need it dont use it 
___________________
Current status: Taken
Somethings Coming: 07/07/07
**stewis lubs Sarah
**

July 25th, 2006
03:50 AM
Ex-Ninja
Status: Offline!
Originally posted by stewis:
No matter how you do it (unless you compress the output) you wont be saving any bandwidth by moving any of your code to php. also by putting your html code into php files and echoing out the html unless you are actualy doing anything there may be pretty pointless and may use server resources that you may not actualy need...
even just <?php "hello world" ?> would consume more resources than just the server sending the html file taht contains "hello world".
In short if you dont need it dont use it 
What he said basically, I'm too lazy to type it all out when it's already then.
As somebody asked me to do the other day, they wanted their homepage in PHP, because they wanted to use the PHP Date function. But instead of just say doing a simple
They wanted me to echo everything out through PHP (All normal HTML) It almost made me smile!
Never the less, saving bandwidth with simple PHP isn't going to happen, so be smart and use normal HTML if you can!
**Shuts up now as this answer has now been answered like 10 time already
**
___________________
Dan

July 28th, 2006
04:40 PM
thinking of something witty to put here
Status: Offline!
Bandwidth counts as data transferred from the server to another client. If you have one-hundred different scripts will unique ways to output the same data, the end result will use up the same bandwidth because that's all that the client sees.
The difference between these scripts is the amount of load they put on the computer. If you have more than one way to do the same thing, it's generally a good idea to use the one which consumes the least resources. You can check the performance of a function by using a PHP debugger, inline benchmark script, or an external benchmarking tool.
(I realize the question has been answered ten times already, but I don't think any of the answers actually contained a real explanation.)