On 6/16/05, Zeev Suraski <[EMAIL PROTECTED]> wrote: > At 20:39 16/06/2005, Dan Scott wrote: > >On 6/16/05, Zeev Suraski <[EMAIL PROTECTED]> wrote: > > > Why would you enable it then? You have to very explicitly enable it, as > > > it's off by default, and doesn't get enabled even if you switch to E_ALL. > > > >Well, that depends on your definition of "default"; > > I meant what PHP comes with built-in / php.ini-dist. > > >php.ini-recommended in HEAD shows: > > > >; - Show all errors, including coding standards warnings > >; > >error_reporting = E_ALL | E_STRICT > > > >-- so the user who does 'cp php.ini-recommended /etc/php.ini' is, in > >fact, getting E_STRICT by default with the recommended configuration. > > > >Perhaps E_ALL should be the default in php.ini-recommended, with E_ALL > >| E_STRICT a documented (but commented) option. > > Maybe we should be a bit more clear with what we say there. > > Zeev >
To be fair, INSTALL does say: If you instead choose php.ini-recommended, be certain to read the list of changes within, as they affect how PHP behaves. but php.ini-recommended, in the list of changes vs. php.ini-dist, says: ; - error_reporting = E_ALL [Code Cleanliness, Security(?)] ; By default, PHP surpresses errors of type E_NOTICE. These error messages ; are emitted for non-critical errors, but that could be a symptom of a bigger ; problem. Most notably, this will cause error messages about the use ; of uninitialized variables to be displayed. -- so yes, we need to update this section to note the addition of E_STRICT and the deprecation warnings to the list. Suggested patch: --- php.ini-recommended 2005-06-01 23:27:16.000000000 -0400 +++ php.ini-new 2005-06-16 14:09:01.803325720 -0400 @@ -111,11 +111,12 @@ ; - variables_order = "GPCS" [Performance] ; The environment variables are not hashed into the $_ENV. To access ; environment variables, you can use getenv() instead. -; - error_reporting = E_ALL [Code Cleanliness, Security(?)] -; By default, PHP surpresses errors of type E_NOTICE. These error messages +; - error_reporting = E_ALL | E_STRICT [Code Cleanliness, Security(?)] +; By default, PHP suppresses errors of type E_NOTICE. These error messages ; are emitted for non-critical errors, but that could be a symptom of a bigger ; problem. Most notably, this will cause error messages about the use -; of uninitialized variables to be displayed. +; of uninitialized variables to be displayed. Adding E_STRICT will cause +; deprecation warnings for functions like dl() to be displayed. ; - allow_call_time_pass_reference = Off [Code cleanliness] ; It's not possible to decide to force a variable to be passed by reference ; when calling a function. The PHP 4 style to do this is by making the Dan -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php