From: tristen at netoverdrive dot com dot au Operating system: all PHP version: 5.2.6 PHP Bug Type: Feature/Change Request Bug description: New functions require_code/include_code
Description: ------------ It would be nice to be able to include code from a variable, ie: $code = array(); $code[] = "$a = 123"; $code[] = "echo $a"; require_code($code); Code generation could then work without first having to output the code to a temporary file and then include it. I know it would be easy enough to write a function to do this but hey: it would make a nice addition to standard PHP. Reproduce code: --------------- n/a Expected result: ---------------- n/a Actual result: -------------- n/a -- Edit bug report at http://bugs.php.net/?id=45782&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45782&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45782&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45782&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45782&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45782&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45782&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=45782&r=needscript Try newer version: http://bugs.php.net/fix.php?id=45782&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45782&r=support Expected behavior: http://bugs.php.net/fix.php?id=45782&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45782&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45782&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45782&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45782&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45782&r=dst IIS Stability: http://bugs.php.net/fix.php?id=45782&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45782&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45782&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45782&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=45782&r=mysqlcfg