SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict sleepingdanny's Avatar
    Join Date
    Oct 2002
    Location
    Israel
    Posts
    270
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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...

    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!?
    Danny Grubman @ http://www.our-network.net
    "Intellectuals solve problems; geniuses prevent them."

  2. #2
    Sidewalking anode's Avatar
    Join Date
    Mar 2001
    Location
    Philadelphia, US
    Posts
    2,205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.
    TuitionFree a free library for the self-taught
    Anode Says... Blogging For Your Pleasure

  3. #3
    SitePoint Addict sleepingdanny's Avatar
    Join Date
    Oct 2002
    Location
    Israel
    Posts
    270
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you anode
    You cleared it out for me.
    Danny Grubman @ http://www.our-network.net
    "Intellectuals solve problems; geniuses prevent them."


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •