What is the difference between the functions unlink and unset?

Answers were Sorted based on User's Feedback



What is the difference between the functions unlink and unset?..

Answer / umapathi

unlink-deletes the file
unset-unsets the variable

Is This Answer Correct ?    50 Yes 2 No

What is the difference between the functions unlink and unset?..

Answer / kiran

unlink() is used to delete a file
unset() is used to delete a variable

Is This Answer Correct ?    44 Yes 5 No

What is the difference between the functions unlink and unset?..

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

What is the difference between the functions unlink and unset?..

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

What is the difference between the functions unlink and unset?..

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

What is the difference between the functions unlink and unset?..

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

What is the difference between the functions unlink and unset?..

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

What is the difference between the functions unlink and unset?..

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

Post New Answer

More PHP Interview Questions

Explain the difference between $message and $$message?

0 Answers  


How can we get the browser properties using PHP?

7 Answers  


A company named Pensar Technologies in chennai has offered me a job as Software Trainee in chennai.But they are asking to pay demand draft of Rs.75000/- in the name of the company.They are saying the gross renumeration will pay Rs.90000/- annually.I want to know whether this is good or bad company?Help me out in this.

18 Answers  


How arrays are used in php?

0 Answers  


how many ways we get current date in php

9 Answers  






What is the difference between exception::getmessage and exception::getline?

0 Answers  


What is session management php?

0 Answers  


What is the ioncube php loader?

0 Answers  


Explain about PHP cookies?

0 Answers  


What is whitespace in php?

0 Answers  


What is php static function?

0 Answers  


Describe session in php.

0 Answers  


Categories