The only thing you need to do is check if your variables are set using isset() , as this will delete your notification. I consider it a good practice to do this if you plan to use any variable that cannot be defined.
In addition, if you do not need the set variable or not, you can also use @ . ( look here if you don't know what @ is)
I donβt think there will be any significant difference in performance (be it micro-optimization, if any), but I believe that in the absence of errors / notifications / warnings, a huge visual improvement will appear.
To hide errors / notifications / warnings, see here .
source share