Hello,

On Mon, Apr 9, 2012 at 10:43 AM, Ralph Schindler
<ra...@ralphschindler.com> wrote:
> Hey Tom,
>
> An idea, why not overload require/include with a second parameter that
> simply enforces an include mode.  For example
>
> // in some autoloader (include, requires, and *_onces)
> include $pathToFile, INCLUDE_MODE_PHP_ONLY;
>
> This would tell the parser/executor to start in PHP mode and never leave it,
> that way, ending tags would throw a runtime/execution error.
>
> Other constants and behaviors could be:
>
>  INCLUDE_MODE_PHP_START;
>  INCLUDE_MODE_PASSTRHOUGH_START; (the current and default behavior)
>
> This would have the least amount of impact on BC, and seeminlyg would be a
> friendly change to the lexer/syntax.
>
> Thoughts?
>
> -ralph
>
>

Although I am not very interested in this feature, if it is
implemented I like the idea of flags instead of introducing new
keywords. Maintaining backwards compatibility would be great
considering the benefit to the feature to be completely honest (and in
disagreement to many people, but I do understand the reasoning for
everyone's interest in it) is extremely minor in my eyes.

In addition I would suggest maybe using PHP_INCLUDE_* as a place for
these constants to live.

-Chris

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to