In php.net, the syntax is as follows:
string ini_set (string $ varname, string $ newvalue)
All parameters must be string . In the php.ini file, all logical values ββare shown as On or Off . The following solution should be the most correct solution:
ini_set('display_errors', 'On'); ini_set('display_errors', 'Off');
In the documentation for the configuration file, you can find the following part:
Boolean values ββcan be set as follows: true, on, yes or false, off, no, none
http://php.net/manual/en/configuration.file.php
In ini_get return value is a string. The documentation states:
The boolean ini off value will be returned as an empty string or "0", and the boolean in on value will be returned as "1". The function can also return a literal string of INI value.
The return value of ini_get and the value for ini_set must be a string!
source share