2 /* Prototype : bool unlink ( string $filename [, resource $context] );
3 Description : Deletes filename
6 /* Try to unlink file when file handle is still in use */
7 <<__EntryPoint
>> function main(): void
{
9 echo "*** Testing unlink() on a file which is in use ***\n";
10 // temp file name used here
11 $filename = __SystemLib\
hphp_test_tmppath('unlink_variation2.tmp');
14 $fp = fopen($filename, "w");
15 // try unlink() on $filename
16 var_dump( unlink($filename) ); // expected: true on linux
17 var_dump( file_exists($filename) ); // confirm file is deleted
18 // now close file handle