You are here: Best Organization of PHP Include Files? « PHP Programming Language « IT news, forums, messages
Best Organization of PHP Include Files?

Posted by David T. Ashley on 03/22/07 22:21

Hi,

In my PHP code, I typically break my functions into groups (usually based on
the data type they operate on), and then include the files, i.e.:

require_once("string_functions.inc");
require_once("large_integer.inc");
etc.

The included files never contain any code that gets executed directly (it is
all in functions, which are then called from the code in the page that is
doing the including).

I've always found PHP to be very fast, but in large projects a large number
of files with a lot of functions could be included. I have to assume that
the PHP interpreter requires some time to parse each include file.

Questions:

a)How inefficient is this? (I.e. how much parsing does the interpeter do of
functions that are included but not yet called?).

b)What is the best paradigm for managing include files?

Thanks, Dave.
--
David T. Ashley (dta@e3ft.com)
http://www.e3ft.com (Consulting Home Page)
http://www.dtashley.com (Personal Home Page)
http://gpl.e3ft.com (GPL Publications and Projects)

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация