|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-08-15 19:16 UTC] helly@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 03 09:00:01 2025 UTC |
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