#29688 [Opn->Bgs]: E_STRICT don't work
| From: | helly@php.net | Date: | Sun, 15 Aug 2004 17:17:01 +0000 |
| Subject: | #29688 [Opn->Bgs]: E_STRICT don't work | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-64645@lists.php.net to get a copy of this message | ||
ID: 29688
Updated by: helly@php.net
Reported By: fhenninot at freesurf dot fr
-Status: Open
+Status: Bogus
Bug Type: *General Issues
Operating System: RH9
PHP Version: 5.0.1
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Your code is wrong.
Previous Comments:
------------------------------------------------------------------------
[2004-08-15 19:03:46] fhenninot at freesurf dot fr
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 this bug report at http://bugs.php.net/?id=29688&edit=1