What is 22527 in error_reporting 22527 of phpinfo
This value is actually bitmap mask, a sum of constants.
So, 22527 is
16384 E_USER_DEPRECATED
+
4096 E_RECOVERABLE_ERROR
+
etc...
In your case it's E_ALL & ~E_DEPRECATED
, it will display every error, except E_DEPRECATED
.
PHP versions below 5.4 will also exclude E_STRICT
errors (since E_STRICT
is not included in E_ALL
before that version)
What does the ^ symbol mean (specifically, within error_reporting)
~
means "except" DOCS
In your second example that would mean E_ALL
except E_NOTICE
and E_STRICT
The ^
is a "flipper":
^ is the xor (bit flipping) operator and would actually turn notices on if they were previously off (in the error level on its left).
global php error reporting - can I include a file to stop errors displaying?
Edit your php.ini
file and set:
error_reporting = 32759
If you're using Apache, you can also set it in httpd.conf
or a .htaccess
file:
php_value error_reporting 32759
The numbers are looked up from: http://php.net/errorfunc.constants
Numeric values of error reporting levels
From the page we have:
E_ALL
has the value30719
in PHP
5.3.x,6143
in PHP 5.2.x,2047
previouslyE_NOTICE
has the value8
Looks like you are using PHP 5.2.x
Now If you do E_ALL & ~E_NOTICE
Which is bitwise complement of E_NOTICE
followed by bitwise anding with E_ALL
we get
6143 & (~8) = 6135
Not getting Deprecated error as expected
E_DEPRECATED
is a subset of E_ALL
, so if:
display_errors
is onerror_reporting(E_ALL)
is in effectsession_register
is called- you are using PHP >= 5.3
then the error should be visible. If it is not, at least one of the above does not hold.
Related Topics
Simple Comet Example Using PHP and Jquery
Codeigniter - Correct Way to Link to Another Page in a View
Codeigniter Assets Folder Best Practice
How to Use PHP in a JavaScript Function
Twilio PHP - Ssl Certificate: Self Signed Certificate in Certificate Chain
Arabic Characters in JSON Decoding
Using Laravel Socialite to Login to Facebook
Laravel's 5.3 Passport and API Routes
Select Within 20 Kilometers Based on Latitude/Longitude
How to Replace Multiple Items from a Text String in PHP
Return Errors from PHP Run Via. Ajax
Curl Requires Curlopt_Ssl_Verifypeer=False
Create New Product Attribute Programmatically in Woocommerce
Recursive Function to Get All the Child Categories
Load Block Outside Magento, and Apply Current Template