You have some options.
a) If you are in our shared cPanel hosting, use the PHP Selector from your cPanel to directly edit this and other PHP variables in the php.ini for the PHP running in your hosting account.
b) If you are in our shared cPanel hosting, create or edit the .htaccess file and put it in the directory where you are running the php script where the php function is erroring, with the following line in the file:
php_flag display_errors Off
c) Add the following line in your php script file: