PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
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.
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.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
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.
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.).
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