Mine
public text v1 · immutable// four possible unique names, for instances of the script... 2-3 of them get the same file name.. WHY !?
do {
$fileName = $_SERVER['DOCUMENT_ROOT'].'/test'.mt_rand(0,3).'.txt';
$fileHandle = @fopen($fileName,'x');
echo $fileName.'<br>';
} while ($fileHandle === false);
echo '^ this is it<br>';
sleep(10); // increase running time of the script to force collisions with the other instances