![]() |
evaled on page generation
Quote:
|
If you take a look at table datastore for record pluginlist you will find smth. linke this:
Code:
a:1:{s:12:"global_start";s:32:"// some code for hook global.php"} Upon execution it will be unserialized: PHP Code:
PHP Code:
As this unserializing and evaluating is being done at execution time it generates overhead. So for larger code modifications you might want to use include files - then less code must be unserailized and evaled. Include files can also be pre-compiled/cached -> eAccelerator/ZEND Performance Suite/etc. |
When are plugins first available, i.e., is a plugin first available in init.php or global.php or ???
|
I don't understand this question.
|
Quote:
Quote:
EDIT: Argh, the Automerged Doublepost got me! :D |
Only the include statement. Of yourse the included file must aso be parsed/compiled, but as already said files can be cached.
Quote:
What to you want to know - variable scope? If your plugin is being called from within a function, the any variables you set (if you don't define them as global) will only be visible within this function. If your plugin is being called from a global scope, then variables will be global. |
Okay, thanks. Now when is $foo from a plugin first available, i.e., what is the first file that $foo will be able to be used in, if $foo is set via plugin?
|
Quote:
|
Quote:
|
Quote:
The first hook being called is fetch_userinfo from init.php (line 362): PHP Code:
|
All times are GMT. The time now is 08:22 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|