E_ALL | E_STRICT
5 answers - 527 bytes -

>>
tul
>>
>>P.S. isn't error_reporting( FATAL | ERRR | WARNING ); supposed to
>>be error_reporting( E_FATAL | E_ERRR | E_WARNING ); ?
Good catch.
I'm not sure where I got that -- probably a message from some
flounder (Bullwinkle circa 1964).
In my newer scripts I use:
ini_set('error_reporting', E_ALL | E_STRICT);
However, I'm not sure if that's redundant.
tedd
No.1 | | 547 bytes |
| 
tedd wrote:
- tul
P.S. isn't error_reporting( FATAL | ERRR | WARNING ); supposed to be
error_reporting( E_FATAL | E_ERRR | E_WARNING ); ?
Good catch.
I'm not sure where I got that -- probably a message from some flounder
(Bullwinkle circa 1964).
In my newer scripts I use:
ini_set('error_reporting', E_ALL | E_STRICT);
However, I'm not sure if that's redundant.
tedd
It isn't redundant :) - E_STRICT isn't covered under E_ALL in PHP5 IIRC.
No.2 | | 1310 bytes |
| 
Ligaya Turmelle wrote:
tedd wrote:
- tul
P.S. isn't error_reporting( FATAL | ERRR | WARNING ); supposed to
be error_reporting( E_FATAL | E_ERRR | E_WARNING ); ?
>>
>>
>>
>Good catch.
>>
>I'm not sure where I got that -- probably a message from some flounder
>(Bullwinkle circa 1964).
>>
>In my newer scripts I use:
>>
>ini_set('error_reporting', E_ALL | E_STRICT);
>>
>However, I'm not sure if that's redundant.
>>
>tedd
It isn't redundant :) - E_STRICT isn't covered under E_ALL in PHP5 IIRC.
correct.
E_STRICT is supposed to be used *only* to flag not recommended code (i.e. a pedantic mode)
unfortunately use of E_STRICT has been 'abused' in cases where E_DEPRECIATED should have
been used (i.e. for code that will stop working in the future rather than for code which
the developers think is not proper)
of course it doesn't help that there is no such thing as 'E_DEPRECIATED' (yet?)
No.3 | | 986 bytes |
| 
At 4:20 PM +0200 8/25/06, Jochem Maas wrote:
It isn't redundant :) - E_STRICT isn't covered under E_ALL in PHP5 IIRC.
>
>correct.
>
>E_STRICT is supposed to be used *only* to flag not recommended code
>(i.e. a pedantic mode)
>unfortunately use of E_STRICT has been 'abused' in cases where
>E_DEPRECIATED should have
>been used (i.e. for code that will stop working in the future rather
>than for code which
>the developers think is not proper)
>
>of course it doesn't help that there is no such thing as
>'E_DEPRECIATED' (yet?)
Jochem:
So, what's the verdict, is this :
ini_set('error_reporting', E_ALL | E_STRICT);
or should I lose the E_STRICT, or should it be something else?
I want to turn as much error checking as I can. I'm not using php 5, just yet.
Thanks.
tedd
No.4 | | 477 bytes |
| 
tedd schreef:
Jochem:
So, what's the verdict, is this :
ini_set('error_reporting', E_ALL | E_STRICT);
or should I lose the E_STRICT, or should it be something else?
I want to turn as much error checking as I can. I'm not using php 5,
just yet.
Thanks.
tedd
Hi Tedd,
E_STRICT isn't available prior to PHP 5.
Best regards,
Andries Seutens
Belgium
http://andries.systray.be
No.5 | | 709 bytes |
| 
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Fri, 2006-08-25 at 10:43 -0400, tedd wrote:
or should I lose the E_STRICT, or should it be something else?
E_ALL in php4 will pick up everything, notices, warnings, the lot.
I want to turn as much error checking as I can. I'm not using php 5, just yet.
E_STRICT in php5 will do the same, but as soon as you start using, say,
a PEAR object, you will get notices about using deprecated "var"
keywords, so E_ALL normally suffices there too. In both our php4 and 5
projects we use E_ALL for that reason.
Content-Type: text/plain;
All Email originating from UWC is covered by disclaimer