How can i use function, if i don't know time of perfomance???
I think, that there is a requirement to rewrite function shell_exec that it waited the ending of work shell.
And cmd.exe is already called in shell exec.
But don't work. Call "shell_exec('cmd /c del /F /Q testfile.txt');" without "cmd /c" have not any result. You may check this.