--TEST--
Testing unlink() function : basic functionality
--FILE--
<?php
$file_path = dirname(__FILE__);
echo "*** Testing unlink() on a file ***\n";
$filename = "$file_path/unlink_basic.tmp"; $fp = fopen($filename, "w"); fwrite($fp, "Hello World");
fclose($fp);
var_dump( unlink($filename) );
var_dump( file_exists($filename) );
echo "\n*** Testing unlink() : checking second argument ***\n";
$context = stream_context_create();
$filename = "$file_path/unlink_basic.tmp";
$fp = fopen($filename, "w"); fclose($fp);
var_dump( unlink($filename, $context) ); var_dump( file_exists($filename) );
echo "Done\n";
?>
--EXPECTF--
*** Testing unlink() on a file ***
bool(true)
bool(false)
*** Testing unlink() : checking second argument ***
bool(true)
bool(false)
Done