unread
Currently we should uses the @-operator on mkdir()
, for instance, to check
a race condition. Something like:
if (!@mkdir('test')) {
throw new SomeException();
}
Should be fine if we can do something like that, instead:
try {
mkdir('test');
}
catch (FileExistsException $exception) {
throw new SomeException();
}
It will avoid the @-operator and make the result more reliable (for
instance, if you don't uses the @-operator in this case and is catched by a
race condition).
--
David Rodrigues