You are here: Re: __SELF__? « PHP Programming Language « IT news, forums, messages
Re: __SELF__?

Posted by Chung Leong on 05/14/06 19:18

Alan Little wrote:
> OK. When you said, "using includes as functions", I took it to mean
> having a bit of code that's called from various places in the main code,
> and putting it in an included file, rather than a function. I once had a
> date-selector generator that I did that with, but long ago converted it
> to a function. I'm not trying to be a smart@$$, I just didn't see how
> that applied to plugins.

Whether the code is included once or many times is unimportant. The key
deficencies of includes are the lack of a clear interface and the lack
of variable scoping. For your plug-ins, how are the authors supposed to
know what variables are available? I mean their code would just inherit
the entire global scope. How do you prevent them from accidently
overwriting variables?

 

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

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