Re: On constructors: BC Break and Class compiler Improvements
| From: | Ralph Schindler | Date: | Sat, 03 Apr 2010 14:33:03 +0000 |
| Subject: | Re: On constructors: BC Break and Class compiler Improvements | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-47769@lists.php.net to get a copy of this message | ||
Stanislav Malyshev wrote:
Hi!Nothing changed, you are right, the behavior is there in all these versions. My PHP's for 5.3.0 and 5.3.1&2 have different default values for error_reporting, and since changing to E_STRICT at runtime is too late (file already compiled with error_reporting of php.ini), I was not triggering the code properly. (My 5.3.0 was shipped from apple, as was their php.ini which the default error_reporting value is E_ALL & ~E_NOTICE & ~E_DEPRECATED, not the newly recommended php.ini-development value of E_ALL | E_STRICT. Also, in 5.2 series, the PHP group never recommended to use E_STRICT in the php.ini, another reason the code was not triggered in my testing.) -ralphclass Filter { public function __construct() { /* construct stuff */ } public function filter($value) { /* return filtered */ } } Produces: PHP Strict Standards: Redefining already defined constructor for class Zend\Filter\Filter in [snip file] on line [snip line]I just checked - this code produces the same warning in 5.2 (without the namespace of course), and in 5.3.0. So I don't see what changed in 5.3.1 exactly?