#34210 [NEW]: Feature to run function inline within the local scope
| From: | jdv at foobar dot be | Date: | Mon, 22 Aug 2005 12:42:27 +0000 |
| Subject: | #34210 [NEW]: Feature to run function inline within the local scope | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-83866@lists.php.net to get a copy of this message | ||
From: jdv at foobar dot be
Operating system: Linux
PHP version: 5.0.4
PHP Bug Type: Feature/Change Request
Bug description: Feature to run function inline within the local scope
Description:
------------
It would be nice to see a feature that allowed for functions to be
executed, inline, within the current local scope. The behaviour I intend
for is that of eval(). Calling eval($code) allows $code to access
variables from the local scope from which eval is called. It also allows
$code to set variables in this local scope. Both features, if accessible
to user-defined functions, would come in handy on occasions.
One particular useful function that could be built if this functionality
existed, would accept a string for argument and replace all %foo
occurences in it by the -- according to context -- properly escaped value
of $foo. Such a function could then be used for composing HTML and SQL
strings more easily.
--
Edit bug report at http://bugs.php.net/?id=34210&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34210&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34210&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34210&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=34210&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=34210&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=34210&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=34210&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=34210&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=34210&r=support
Expected behavior: http://bugs.php.net/fix.php?id=34210&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=34210&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=34210&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=34210&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34210&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=34210&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=34210&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=34210&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=34210&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=34210&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=34210&r=mysqlcfg