Using @ is always a bad practice. It will suppress the error message if it occurs, while error messages are extremely useful for the programmer, and suppression is suicide. The fate of PHP should be used mainly not by programmers, but by random users who have no idea. You have this code from one of the last. So, itβs better to get rid of all @ , so you can see what happened and fix the error.
Please note that each error message has a specific meaning and explains what the problem is. For example, you might have a file system permission issue or setting PHP OPEN_BASEDIR to prevent the file from opening. Thus, the error message tells you what to do. Error messages are good, and @ is evil.
source share