Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I understand that in normal php if we're including a file we're merging the source of it in the script and it would take longer for that page to be parsed/processed but if we're using HipHop shouldn't it be ok to just create one single php file and include every file in it (that contains some class) and every page which needs those classes (in separate file each) can just include one single php file?

Would this be ok in presence of HipHop?

share|improve this question
up vote 3 down vote accepted

Correct way to handle this situation is using spl_autoload_register method to register your custom method that will be invoked every time a class is used in your file which is not yet declared.

In the implementation of this method you can do a dynamic include based on the class name. It is also supported in HipHop

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.