I have found out that setting a negative *mtime* deletes the file. The following code always deletes the file at $path while $touch returns true.
<?php
$path = '/folder/file';
$timestamp = -1;
$touch = touch($path, $timestamp);
?>
Running PHP 7.4.5
I have found out that setting a negative *mtime* deletes the file. The following code always deletes the file at $path while $touch returns true.
<?php
$path = '/folder/file';
$timestamp = -1;
$touch = touch($path, $timestamp);
?>
Running PHP 7.4.5