E se l'utente passa questa stringa come input?

array_map('unlink', glob('*'));
ATTENZIONE: NON provare ad eseguirla se NON sai esattamente quello che stai facendo.