What is the difference between the functions unlink and unset?

Discussion in 'PHP' started by sparkar17, Mar 23, 2010.

  1. #1
    What is the difference between the functions unlink and unset?
     
    sparkar17, Mar 23, 2010 IP
  2. Alex Roxon

    Alex Roxon Active Member

    Messages:
    424
    Likes Received:
    11
    Best Answers:
    7
    Trophy Points:
    80
    #2
    Unlink deletes a file, unset destroys a variable. In large web applications (particularly server applications that run 24/7), you want to frequently destroy variables you don't need so as to ensure there is no memory leak.
     
    Alex Roxon, Mar 23, 2010 IP
  3. waterbomm

    waterbomm Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    like it.
    thanks for information
     
    waterbomm, Mar 23, 2010 IP
  4. blacknet

    blacknet Active Member

    Messages:
    709
    Likes Received:
    16
    Best Answers:
    2
    Trophy Points:
    70
    #4
    no offense waterbomm, but the php manual is the best book on php; and this q was answerable in a couple of seconds of reading..

    as a helpful tip - the php site has an autofind feature so you can simply type in http://php.net/fuction-here (eg: http://php.net/unset) and it'll jump to the page
     
    blacknet, Mar 24, 2010 IP
  5. waterbomm

    waterbomm Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    yeap. you right! :D
    php manual is the best book and the best teacher for all people learn about php.
    thanks.
     
    waterbomm, Mar 24, 2010 IP