RE: [PHP-DEV] short_open_tag
| From: | Jared Williams | Date: | Wed, 26 Mar 2008 22:57:46 +0000 |
| Subject: | RE: [PHP-DEV] short_open_tag | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-36586@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Stanislav Malyshev [mailto:stas@zend.com]
> Sent: 26 March 2008 20:28
> To: Lukas Kahwe Smith
> Cc: Derick Rethans; Marcus Boerger; Hannes Magnusson; PHP Internals
> Subject: Re: [PHP-DEV] short_open_tag
>
> Hi!
>
> > do note that we have increasingly large numbers of way to
> jump out of
> > the scope (exceptions, recoverable errors). this obviously
> makes these
> > kinds of cleanups potentially easier to forget.
>
> You'd need to catch and process exceptions anyway, and
> recoverable errors, as far as I understand, are not meant as
> jumping out of scope (you can run the handler, but the you're
> back to where the error was, right?).
> However, exceptions are a good point - actually, the first
> good objection to this thing. Need to think if this can be
> solved easily.
> --
> Stanislav Malyshev, Zend Software Architect
> stas@zend.com http://www.zend.com/
> (408)253-8829 MSN: stas@zend.com
>
> --
You use a class constructor to change the ini setting, and the destructor to
revert it back.
That way once the instance is out of scope the change will be automatically
reverted?
Jared