Re: In regards to E_STRICT and PHP5

From: Date: Thu, 16 Jun 2005 16:57:49 +0000
Subject: Re: In regards to E_STRICT and PHP5
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-16747@lists.php.net to get a copy of this message
> If there is any merit to E_STRICT as it stands currently I find it to > be negated by the fact that it throws messages for completely > acceptable code that the engine is both willing and capable of > handling. If var is not acceptable, I think it should be removed as a > keyword. If it is acceptable, the engine shouldn't complain about it. > (of course, I think it is acceptable.) > Answer: No, it's not acceptable. But expecting everyone out there using PHP to update their code (which they probably didn't write themselves anyway) is even more unacceptable. Solution: Throw no warnings in the default error reporting level, but provide a hook for script developers to find the code that needs changing. If anything, E_STRICT needs expanding. For example, zend_function_entry should have a flag to indicate deprecation. When a deprecated method is called: zend_error(E_STRICT, "Call to deprecated function %s()", fname); -Sara

« previous php.internals (#16747) next »