Re: Re: Disabling PHP tags by php.ini and CLI options
| From: | Yasuo Ohgaki | Date: | Fri, 13 Apr 2012 22:52:33 +0000 |
| Subject: | Re: Re: Disabling PHP tags by php.ini and CLI options | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-59919@lists.php.net to get a copy of this message | ||
Hi,
2012/4/14 Yasuo Ohgaki <yohgaki@ohgaki.net>:
> Hi,
>
> 2012/4/14 Matthew Weier O'Phinney <weierophinney@php.net>:
>> On 2012-04-13, Tom Boutell <tom@punkave.com> wrote:
>>> Wouldn't this be a significant performance hit when multiplied by
>>> every class file in a project?
>>
>> Typically, you'd cache the end-result of pre-processing, so that
>> subsequent requests can use the processed results. In other words, you
>> incur the expense once per file.
>>
>
> We don't have to look up already processed for
> script_once() by ourselves. Looking up included file
should be
We don't have to manage already processed files for
script_once() buy ourselves.
--
Yasuo Ohgaki
> cache array is enough. script_once() would be fast
> enough for most cases. script() will be slower, but
> nobody would care.
>
> Regards,
>
> --
> Yasuo Ohgaki
>
>>> On Fri, Apr 13, 2012 at 10:15 AM, Matthew Weier O'Phinney
>>> <weierophinney@php.net> wrote:
>>> > On 2012-04-13, David Muir <davidkmuir@gmail.com> wrote:
>>> > > On 13/04/12 14:55, Stas Malyshev wrote:
>>> > > > > If this is a pecl module library developers cannot use it and trust
>>> > > > > that on php 5.n, it just works. That would fork the language in an
>>> > > > > undesirable way. It should be a core feature, no ini flag, no
>>> > > > > sometimes-there module.
>>> > > > PHP 5.n is at least a year away, wide adoption of it - more like 5 years
>>> > > > away. So if you want to write code that would run anywhere (as opposed
>>> > > > on systems you control) you'd have to wait minimum 5 years.
>>> > > > Wouldn't it
>>> > > > better to have it earlier?
>>> > > > OTOH, requiring extensions is a common thing for applications, and any
>>> > > > pecl extension is one command away for most setups, or one download away
>>> > > > for others. And can be made work even in 5.2 if desired.
>>> > >
>>> > > Can't it also be handled using streams to inject a leading <?php to
>>> > > the
>>> > > file prior to inclusion? A PECL extension would then just make it run a
>>> > > bit faster.
>>> >
>>> > I made this very suggestion earlier this week (we do this in ZF1 to
>>> > emulate short tag support for those who use them).
>>
>>
>> --
>> Matthew Weier O'Phinney
>> Project Lead | matthew@zend.com
>> Zend Framework | http://framework.zend.com/
>> PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc
>>
>> --
>> PHP Internals - PHP Runtime Development Mailing List
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>