The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
strict and functions
As some of you may know, I am learning PHP.
In the book I am using I came to a chapter about functions. It explained the use of strict. I do not fully understand what strict does. From what I read (I'm probebly wrong) but it makes it so a variable cannot be used outside of a function. But if you do not add global to the beginning of a variable in a function doesnt that do the same thing? What is strict actually for? Thanks in advance. |
#2
|
||||
|
||||
I've never seen "strict" used, but you are correct globals cannot be modified outside anyway. I suppose if you strict a variable that is passed by reference, it would not modify the original. Honestly though, I don't see a purpose to it. Maybe, in structures or classes it has more value due to the complexity of variable permissions.
|
#3
|
||||
|
||||
I've never seen "strict" used, but you are correct globals cannot be modified outside anyway. I suppose if you strict a variable that is passed by reference, it would not modify the original. Honestly though, I don't see a purpose to it. Maybe, in structures or classes it has more value due to the complexity of variable permissions.
|
#4
|
||||
|
||||
strict isn't even in the php manual...
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|