Page 1 of 1

Does PHP filesize affect bandwidth

Posted: Wed Nov 15, 2006 4:05 am
by jimthunderbird
Hi All,
I have a php with around 2000 lines of code, it's a big class with around 80 utility method.
If I use include_once to include this big file, will it affect bandwidth?
Thanks for your help.

With my best,
Jim

Re: Does PHP filesize affect bandwidth

Posted: Wed Nov 15, 2006 4:35 am
by volka
jimthunderbird wrote:If I use include_once to include this big file, will it affect bandwidth?
Yes, of all media that is used to load the file.
But if you load the file from the local filesystem you probably do not have to pay for it ;)

Posted: Wed Nov 15, 2006 7:21 am
by Jenk
No. Only output/input between client and server (and other servers, if you use them) effect bandwidth.

Posted: Wed Nov 15, 2006 10:01 am
by pickle
Despite what the URL says, your browser never sees a PHP file. What your browser sees is the output from that PHP file. So, the size of the PHP file is irrelevant - only it's output matters.

Posted: Wed Nov 15, 2006 10:07 am
by MrPotatoes
so make your output neat, tidy and small :)

Posted: Wed Nov 15, 2006 11:29 am
by volka
Jenk wrote:No. Only output/input between client and server (and other servers, if you use them) effect bandwidth.
depends on what you call "bandwidth" ;) Of cause include 'xyz.php'; uses the bandwidth of my pc's s-ata adapter.
But yes, access to the local filesystem does not create payload on the network adapter.

Posted: Wed Nov 15, 2006 1:20 pm
by timvw
Imho the script, nor the output it generates have an influence on your internet connection bandwidth (but they may be related to my defintion of bandwith.).

Posted: Wed Nov 15, 2006 1:58 pm
by volka
http://en.wikipedia.org/wiki/Bandwidth wrote:Bandwidth is related to channel capacity for information transmission and is often confused with it. In particular, in common usage "bandwidth" also refers to data (information) transmission rates when communicating over certain media or devices.
I can live with beeing common ;)
but will keep the inaccuracy in mind