[thelist] php design question

Max Kanat-Alexander maxka at cats.ucsc.edu
Mon Nov 18 20:09:00 CST 2002


--
[ Picked text/plain from multipart/alternative ]
At 05:33 PM 11/18/2002, you wrote:
>nobody has said boo yet about how objects are better than includes.

         Objects are /different/ than includes.

         Every time you include something, it will run. Every time. The
whole code.

         With an object, it runs only when you ask it to run. It only
"exists" once, and you just reference back to it.

         An include "exists" as many times as you include it.

         Imagine there's a beach ball in your house. That's an object. When
you want to bean somebody in the face with it, you just pick up the beach
ball and throw it.

         You don't make a _new_ beach ball every time you want to throw it
at somebody. That would be an include.

         -Max
--




More information about the thelist mailing list