INCLUDE vs Functions

From: Date: Thu, 27 Jun 2002 16:40:50 +0000
Subject: INCLUDE vs Functions
Groups: php.general 
Request: Send a blank email to php-general+get-104182@lists.php.net to get a copy of this message
I'm re-writing a medium-sized commercial site in PHP. There will be elements that will on nearly every page. I was considering writing each element as a program and then using INCLUDE statements wherever I wanted that element displayed. Now I'm wondering if grouping all those elements into 1 file and defining them as functions would save on system resources and improve speed. In other words is.... <? include "Menu.php"; include "Ads.php"; include "Headlines.php"; ?> More or less efficient than... <? include "Routines.php"; Menu(); Ads(); Headlines(); ?> Thanks, Jeff Gannaway "It's a feeling of fresh opportunity. You're placed in a position a lot of times where not only you're wanted, but where God feels you're needed." -Jalen Rose on being traded to the Bulls

« previous php.general (#104182) next »