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

  • Home
  • SEARCH
  • 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 7815915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T05:40:40+00:00 2026-06-02T05:40:40+00:00

I wanted to see if there was any reason beyond needing it or requiring

  • 0

I wanted to see if there was any reason beyond needing it or requiring it (hence the names). I stumbled upon this statement:

Unlike include(), require() will always read in the target file, even
if the line it’s on never executes. If you want to conditionally
include a file, use include(). The conditional statement won’t affect
the require(). However, if the line on which the require() occurs is
not executed, neither will any of the code in the target file be
executed.

The way I am interpreting it is that includes inside conditionals that do not end up running, will not actually include it in there, which to me seems less costly to the server. I am just curious if this is true. I did not see it in the manual, so I am skeptical.

  • 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-06-02T05:40:41+00:00Added an answer on June 2, 2026 at 5:40 am

    If you have include inside a false statement, it will not get parsed. The same is true for require. The main and only difference is that require will check if the file exists even if it’s never executed. Well, this has been my experience with it, at least.

    So, both only happen once executed, but require will show an error if the file doesn’t exist, regardless of whether it’s executed.

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

Sidebar

Related Questions

I see there is full ajax mode but I wanted to see if there
I wanted to see if there is a cleaner and more effective way of
I just wanted to see if there was a better way I should be
Are there any lightweight frameworks out there for this task. I have a collection
I am working with MVP in ASP.NET and wanted see if there is an
There may not be any real world use for this but i was wondering
I believe there are different flavors of this questions already asked, but I wanted
Is there any logical reason why a stored procedure would run very slow (>60
Wanted to see if anyone knows how to add props to a image with
I wanted to see what happened if you change the reference of an object

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.