Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

show all errors except notice and strict in php

i want to log all php errors except notice and strict i tried the following code

error_reporting(E_ALL &^ E_NOTICE &^ E_STRICT);

but it gave me an error "unexpected ^"

like image 765
Sherif Eldeeb Avatar asked Sep 15 '25 19:09

Sherif Eldeeb


1 Answers

You need to use & ~ instead of &^:

error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT);
like image 93
hassan Avatar answered Sep 18 '25 11:09

hassan