delete file in php with function

delete file in php with function

unlink()  function used file delete in php
example 
$file = "test.txt";
unlink($file);