#47515 [NEW]: make create_function to execute immediately
From: kexianbin at diyism dot com
Operating system: windows xp
PHP version: 5.3CVS-2009-02-27 (snap)
PHP Bug Type: Feature/Change Request
Bug description: make create_function to execute immediately
Description:
------------
I submit a function request:
to make create_function to execute immediately like this:
When could we realize this in php?
create_function('$v', <<<'nowdoc'
echo $v;
nowdoc
)('hello');
I know i can type thus:
$f=create_function('$v', <<<'nowdoc'
echo $v;
nowdoc
);
$f('hello');
even thus:
${!${''}=create_function('$v', <<<'nowdoc'
echo $v;
nowdoc
)}('hello');
but both the 2nd and 3rd are ugly, i need the 1st style.
Expected result:
----------------
Show 'hello'
Actual result:
--------------
Show 'Parse error: parse error'
--
Edit bug report at http://bugs.php.net/?id=47515&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47515&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47515&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47515&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=47515&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47515&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=47515&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=47515&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=47515&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=47515&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=47515&r=support
Expected behavior: http://bugs.php.net/fix.php?id=47515&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=47515&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=47515&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=47515&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47515&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=47515&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=47515&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=47515&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=47515&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=47515&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=47515&r=mysqlcfg
Thread (6 messages)
- kexianbin at diyism dot com