What is the difference between the functions unlink and unset?
Answers were Sorted based on User's Feedback
Answer / umapathi
unlink-deletes the file
unset-unsets the variable
| Is This Answer Correct ? | 50 Yes | 2 No |
Answer / kiran
unlink() is used to delete a file
unset() is used to delete a variable
| Is This Answer Correct ? | 44 Yes | 5 No |
Answer / jeyaprabhu
Unlink() is a function for Delete the file.
unset is a function for delete the variable.
| Is This Answer Correct ? | 9 Yes | 2 No |
Answer / n.boopathi
UNLINK:unlink-deletes the file.
UNSET:Unset is function which is use the unset (destroys OR
delete) the
specified variable.
| Is This Answer Correct ? | 6 Yes | 0 No |
Answer / prahallada
unlink() is a function for file system handling.
It will simply delete the file in context.
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. It is phrased as Unset ($remove).
Also Known As: Unset Variable, Destroy Variable
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / manish kumar
Unset is function which is use the unset (destroys) the
specified variable but unlink is also a function which is
used to deletes a file.
| Is This Answer Correct ? | 4 Yes | 2 No |
Answer / pinky
unlink is used to delete the file where as
unset is used to delete the variable and the content of file.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / suprita pandey
Unlink() :-remove file from server.
unlink(' /path/file.phtml');
Unset() :-remove the variable.
unset($variableName);
| Is This Answer Correct ? | 0 Yes | 0 No |
What are the string functions in php?
Extract url from this string? It should be flexible for all strings, not for this string only. "yahoo.comyahoo.co.inhotmail.org"
How to write in a file in php?
How is session id stored in browser?
how long a default session stay in php?
i got 2 year backs in my MCA,i am 28 year guy, presently learning PHP, can i get the job & on facing the interview wht i will answer out for that?? (experience in as a 1.5yr System analyst after graduation)
What is artisan in php?
What is difference between rest api and restful api?
Do you know is it possible to extend the execution time of a php script?
Explain about getters and setters in php?
How to retrieve the original query string?
What is csrf cookie?