Disable PHP Warnings for only PART OF the code

Viewed 7107

In order to disable PHP Warnings, you will need to set the following parameters in php.ini

error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
display_errors = On

or

display_errors = Off

The above method will disable warnings for the whole project. Is there a way to disable warnings for only a block of php code, i.e. disable warnings for certain functions or few lines of code?

2 Answers
Related