Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6248841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:07:56+00:00 2026-05-24T13:07:56+00:00

I used php on my website so it can display multiple languages. I noticed

  • 0

I used php on my website so it can display multiple languages. I noticed the size of the html files reduced because most of the text was moved to a new large php file, which contains all “idiomatic” text in all languages available (just two in my case).

My problem is: Previously a html page was downloaded with just the necessary text. Now a smaller html page is downloaded but a large php file is always included, whether the html uses more or less lines of it.

Questions:

  1. When a php file is included (include_once(file.php); or require_once(file.php);) what is happening? Is the content of the file.php being copied to the html? Is it just used to say to the language processor “If you need to resolve a name, you may want to look at file.php“?
  2. What is more (speed) efficient; to have one large php with every language of every html page inside; or to have one php file per html page only with the code needed by that page?
  3. Should a php be included right before being used, or should be a general include at the top of the page that gets most of the php that will eventually be used along the html page?
  4. Finally, does php increase a page loading time?

P.S: Anyone tried PHP Speedy? Does it really works? Does it have any problems (compatibility) ?


I found out:

  1. (check solution)
  2. Both solutions have exactly the same performance. I chose to separate the file by language because it feels tidier.
  3. Same as above, no impact on performance.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T13:07:57+00:00Added an answer on May 24, 2026 at 1:07 pm

    1) Every include / require statement is replaced by the content of the included / required file. The content of the included file itself is becoming part of the executing script however if it will become part of the HTML response depends upon the content itself.

    2) Unless you have a very large number of visitors you will hardly notice a difference between including one large file and several smaller ones. However its good practice to include only parts which are actually required because that way you are saving web server memory and resources which might present a problem in case of a large number of requests.

    3) It doesn’t really matter where you include your code. For pure organization reasons its good to include all the stuff right at the beginning of the script however sometimes this is not possible which means that you’ll often see code included inside functions etc.

    4) There is some latency involved with parsing PHP files when compared against pure HTML files because the process involves a “roundtrip” to the web server extension itself however because of the internal caching mechanisms etc. that latency is very hard to spot, if not almost impossible to prove statistically.

    EDIT: If you are concerned about your web site performance a good place to start are some of the Google Chrome extensions such as Page Speed and Speed Tracer. They will help you pinpoint the usual problems that might lower your web site performance.

    For the server side its always good to use code profilers to find potential performance hogs such as high number of function calls etc. For that you can use xDebug PHP debugger which comes with an excellent profiler and WebGrind to analyze the performance itself.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a folder on my website just for random files. I used php
I used this guide on Apple's website to enable PHP on my computer but
I'm creating a used cars website (written in PHP), and I'm stuck on sending
I have a website which uses PHP and HTML pages, I want to create
Does anyone know whether PHP can be used to include an IRC channel in
I have a url address on my website: register.php?username=jz&email=jz@hotmail.com the code used to create
As far as I know, only PHP can't be used for this. But since
I used fireworks with netbeans to make php website. First i sliced my design
I used to have PHP websites and using url rewriting on picture to have
I have used PHP for awhile now and have used it well with CodeIgniter,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.