PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
It's bad practice to sweep exceptions under the carpet like that..
Setting error_reporting(0) and/or display_errors(0) does not stop the errors occuring, it only stops them being reported. They still need to be caught and handled accordingly.
Though the difference in performance is negligible at best.
Leaving them set to display should only occur during development, then when you are satisfied that your application does not produce any of the php E_ errors, it is best advised to set display_errors(0) and set error_reporting(0) so that in the chance of someone wanting to crack your site, life won't be easy for them due to the sensitive info these errors can produce. (directory stucture being the main one)
the difference can be significant if you would normally generate many (read hundreds) of notices. All the errors still fire, and php has to handle them. It's a fairly linear increase in processing requirements overall. I've personally seen ten fold speed improvements when I accidentally had a script that generated about 10000 notices (lots and lots of calls to the same area of code thankfully)