-
A couple of questions
1. I'v read in a book what's the "static" function do, but I didn't exacly understood it.
Can you explain it to me?? Please... :rolleyes:
2. What's the difference between "filemtime" = last moddified time and "filectime" = last change time??
It seems that this two functions do the same thing!? :xeye:
-
1.static is a language construct, not a function. It marks a variable that persists across multiple calls to a function, for example.
PHP Code:
function staticDemo() {
static $a;
return $a++;
}
echo staticDemo(); //echoes 1
echo staticDemo(); //echoes 2
2.filectime() records the last time anything about the file or in the file was changed. filemtime() only records teh last time the content was changed. If you were to change the permissions or the owner, for example, filectime() would reflect it, but filemtime() would not.
-
Thank you anode :p
You cleared it out for me.