From: fhenninot at freesurf dot fr Operating system: RH9 PHP version: 5.0.1 PHP Bug Type: *General Issues Bug description: E_STRICT don't work
Description: ------------ if 'error_reporting' is set to E_STRICT in php.ini, it's impossible to reset it in code. And if 'error_reporting' is not set to E_STRICT in the php.ini, it's impossible to set it in code. It's a really big problem for the compatibility with PHP4 program. Reproduce code: --------------- <?php echo "start : ".error_reporting()."<br>"; error_reporting(E_ALL ^E_STRICT); echo "after : ".error_reporting()."<br>"; class foo{ var $toto; function foo(){ echo "construct<br>"; } } $instance =& new foo(); echo "undefined var : ".$novar; echo "End : ".error_reporting()."<br>"; ?> Expected result: ---------------- if E_STRICT in php.ini, i must have just a 'NOTICE' error : [client xxx.xxx.xxx.xxx] PHP Notice: Undefined variable: novar in /usr/local/apache/htdocs/test.php on line 15 Actual result: -------------- I have the notice error message but i've too the 'STRICT' error message : [client xxx.xxx.xxx.xxx] PHP Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /usr/local/apache/htdocs/test.php on line 7 [client xxx.xxx.xxx.xxx] PHP Strict Standards: Assigning the return value of new by reference is deprecated in /usr/local/apache/htdocs/test.php on line 14 -- Edit bug report at http://bugs.php.net/?id=29688&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29688&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29688&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29688&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29688&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29688&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29688&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29688&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=29688&r=support Expected behavior: http://bugs.php.net/fix.php?id=29688&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=29688&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=29688&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29688&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29688&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29688&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29688&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=29688&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29688&r=float