From:             [EMAIL PROTECTED]
Operating system: All
PHP version:      4.3.0
PHP Bug Type:     Feature/Change Request
Bug description:  include() and Variables

What follows is a feature request.  Searching the existing feature requests
have not turned up any similar results.

I have found that it might be convenient to allow include() and/or
require() to be able to accept a variable as input.

A couple of scenarios that this might be useful:

* Caching script segments
* Evaluating PHP inside of templates

My workaround has been to dump a variable to disk and then include it as a
file, after determining a unique file name to use.  After including the
file, it was deleted from disk.  This was for a templating system that
could recursively include other templates that may or may not include
php.

The reason for the approach was to reuse php as a the template scripting
language, as well.  Performance on my test server has been okay, but I am
sure that with a large amount of traffic, the file i/o would slow the
process down considerably.
-- 
Edit bug report at http://bugs.php.net/?id=21971&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=21971&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=21971&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=21971&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=21971&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=21971&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=21971&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=21971&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=21971&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=21971&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=21971&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21971&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=21971&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=21971&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=21971&r=gnused

Reply via email to