Jump to content

Inlcuding Classes - Web page load time?


magnetica

Recommended Posts

Hi All

 

Consider the following script where the 'file_containing_class.php' is say 50kb in size but $name only uses a portion of the file that is say 1kb

 

require_once 'file_containing_class.php'
$class = new Class;
   //$namewould be something like Tom etc
     $name = $class->getName();

 

Does the user have to download the whole php file or just the part that is being called?

 

So here would the user download the whole 50kb or just the 1kb being called?

 

Thanks, Magnetica

Link to comment
https://forums.phpfreaks.com/topic/208489-inlcuding-classes-web-page-load-time/
Share on other sites

Ok thanks.

So the user wouldn't directly download the php file.

 

php would however read the whole include/require file on the server.

 

So would the user still have to wait for the server to download and read the whole file?

 

Or does the file not have to download it but just find it?

 

Thanks,  Magnetica

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.