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 169057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T12:33:47+00:00 2026-05-11T12:33:47+00:00

What solution would you recommend for including files in a PHP project? There aren’t

  • 0

What solution would you recommend for including files in a PHP project?

  1. There aren’t manual calls of require/include functions – everything loads through autoload functions
  2. Package importing, when needed.

Here is the package importing API:

import('util.html.HTMLParser'); import('template.arras.*');  

In this function declaration you can explode the string with dots (package hierarchy delimeter), looping through files in particular package (folder) to include just one of them or all of them if the asterisk symbol is found at the end of the string, e.g. (‘template.arras.*’).

One of the benefits I can see in package importing method, is that it can force you to use better object decomposition and class grouping.

One of the drawbacks I can see in autoload method – is that autoload function can become very big and not very obvious/readable.

What do you think about it?

  • What benefits/drawbacks can you name in each of this methods?
  • How can I find the best solution for the project?
  • How can I know if there will be any performance problems if package management is used?
  • 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. 2026-05-11T12:33:47+00:00Added an answer on May 11, 2026 at 12:33 pm

    I use __autoload() extensively. The autload function that we use in our application has a few tweaks for backwards compatibility of older classes, but we generally follow a convention when creating new classes that allow the autoload() to work fairly seemlessly:

    • Consistent Class Naming: each class in its own file, each class is named with camel-case separated by an underscore. This maps to the class path. For example, Some_CoolClass maps to our class directory then ‘Some/CoolClass.class.php’. I think some frameworks use this convention.
    • Explicitly Require External Classes: since we don’t have control over the naming of any external libraries that we use, we load them using PHP’s require_once() function.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 206k
  • Answers 206k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer That's the official list : http://www.nvidia.com/object/cuda_learn_products.html Your 9500GS isn't listed… May 12, 2026 at 9:04 pm
  • Editorial Team
    Editorial Team added an answer First it constructs a list containing the results from: for… May 12, 2026 at 9:04 pm
  • Editorial Team
    Editorial Team added an answer Your UI layer should be far-removed from your data access… May 12, 2026 at 9:04 pm

Related Questions

What solution would you recommend for including files in a PHP project? There aren't
I am looking for a library to convert HTML to PDF, including styles. I
We have a web service that we will be hosting on a public web
my team is currently using buildbot to automate overnight and continuous-integration builds and regression
I'm building a game in XNA 3 and I have the levels stored in

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.