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
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?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.