Jump to content

How does PHP read the file?


Northern Flame

Recommended Posts

I am wondering how PHP reads files? I am writing a script that is pretty big, a few hundred lines.

The main statement in my script is a switch() statement and that switch() statement checks

for different $_GET values that will decide what the page will do. I was wondering if it would be

faster to have separate pages for each thing instead of having the switch() or does PHP just skip

the values in the switch() that dont apply to my $_GET value and it makes no difference in the

speed of the page loading time. Does anyone know the answer to my question?

Link to comment
https://forums.phpfreaks.com/topic/90841-how-does-php-read-the-file/
Share on other sites

yeah less script runs fast even if php is not executing your code because it doesnt meet your condition still php will scan your script and check it..

separating the file....

this actually depends let say you have 100 functionality would you like to have 100 page for each functionalities?

or combine related functionalities in one page to produce 5 - 10 page?

now what is better?

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.