declaring static as global crashes the server if used in a function outside the file?
this following code will crash the server potentially....
PHP Code:
i know if a variabled declared as static global the variable scope will be inside the file only. but if it used such way does it means it will be used outside the file scope? |
Re: declaring static as global crashes the server if used in a function outside the f
The variable name or the variable binding is file-local, not its value.
|
Re: declaring static as global crashes the server if used in a function outside the f
so what if i tried to insert a value from another plugin into the variable ? should it throw an error atleast?
|
Re: declaring static as global crashes the server if used in a function outside the f
No. Symbol (variable name, etc) scope has an effect only on where you can name it from. Think about local variables:
Code:
someFunction() { |
Re: declaring static as global crashes the server if used in a function outside the f
a crash prevention measure is to check the existence of the model before precache
|
All times are GMT -4. The time now is 00:58. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.