+ 6
Whatâs the difference between unset() and unlink()?
can you give me a answer
2 Answers
+ 7
thank you
+ 2
unlink() is a function for file system handling, unlink() is used to delete files. Suppose you have uploaded a file and wants to delete this file through the coding then unlink() function is used to delete the file.
unset() is a function for variable management. unset() is used to null out the value of a given variable. or Unset () is used to destroy a variable in PHP. In can be used to remove a single variable, multiple variables, or an element from an array.
in short:
unlink is used to remove/delete files.
Whereas unset is used to unset a variable used in programming. unset() destroys the specified variables.