PHP – Is it possible to test the array_map('unlink', glob('/folder/my_files–*.txt')) command by try/catch?
I would like to test if the function array_map('unlink', glob('...*.txt')) did not encounter an error: ex.: try { array_map('unlink', glob('/folder/my_files--*.txt')); } catch (Exception $e) { echo 'Caught exception: ', $e->getMessage(), "n"; } In your opinion, does this code seem valid?…