> This is my first attempt at submitting a patch so please be gentle :).
>
*sharpens fangs*

> The feature requested in #29416 is something I've wanted to see for a
> while, so I decided to have a go at adding it.
>
Considering the triviality of doing it in user space (the bug report shows
the four lines it'd take) and the potential for changes in how ZE compiles
and executes a new function, I'll throw a -1 vote at it.

> I decided name ob_include described the method by which the function
> did it's job rather than what it was for. I have implemented it as
> eval_file_get_output which I feel is a better description of its
> purpose. The requester suggests require and _once variations but those
> make little sense to me so I haven't implemented those.
>
> Index: ext/standard/basic_functions.c
>
There's a considerable amount of work you're not doing here in terms of
managing variable scope and dealing with the return value (you'll notice
some particular weirdness if you use this from within a function).

Take a look at (PHP5)Zend/zend_execute.c::zend_include_or_eval_handler() or
(PHP4)Zend/zend_execute.c::execute() (the potion involving `case
ZEND_INCLUDE_OR_EVAL:`)

-Sara

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

Reply via email to