Re: RfC: rethink OO inheritance strictness
| From: | Derick Rethans | Date: | Thu, 03 Aug 2006 09:31:27 +0000 |
| Subject: | Re: RfC: rethink OO inheritance strictness | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-25176@lists.php.net to get a copy of this message | ||
On Thu, 3 Aug 2006, Richard Quadling wrote:
> On 03/08/06, Derick Rethans <derick@php.net> wrote:
> > On Thu, 3 Aug 2006, Richard Quadling wrote:
> >
> > > The issue this brings is toggling E_STRICT on and off at RUNTIME
> > > required? (I suspect that would be a LOT of work).
> >
> > It's only an issue for the first script that is opened... not for
> > includes. As the parsing E_STRICT things work fine.... but only *after*
> > the file has been executed. In this example the included file will never
> > throw e_Strict errors for example:
> >
> > <?php
> > error_reporting(0);
> > include 'included.php';
> > ?>
> >
>
> Aha. So, if I use an __autoloader, I COULD be clever and place my
> "loose" classes in 1 directory and my "strict" classes in another. The
> autoloader would search for the class and set the error_reporting
> level appropriately before including/requiring.
Yeah, that would work.
Derick