ID:               43140
 Updated by:       [EMAIL PROTECTED]
 Reported By:      felipensp at gmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Scripting Engine problem
 Operating System: Linux
 PHP Version:      5.3CVS-2007-10-30 (snap)
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

create_fucntion($params, $code) actually is eval("function
lambda1($params) { $code }"). In your code $params is an Array which is
being casted to a string "Array" so the full code reads like
   function lambda(Array) { print1; }
where the error message is misleading but correct.


Previous Comments:
------------------------------------------------------------------------

[2007-10-30 12:09:05] felipensp at gmail dot com

Description:
------------
Parser recognize wrong the array parameter.
It see array(..) as (array).

Reproduce code:
---------------
$a = create_function(array(1), 'print 1;');

Expected result:
----------------
Parse error: syntax error, unexpected T_ARRAY, expecting '&' or
T_VARIABLE

Actual result:
--------------
Parse error: syntax error, unexpected T_ARRAY_CAST, expecting '(' in
/home/felipe/public_html/bug.php(4) : runtime-created function


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=43140&edit=1

Reply via email to