note 105451 added to function.create-function
| From: | web dot developer85 at gmail dot com | Date: | Fri, 19 Aug 2011 07:59:50 +0000 |
| Subject: | note 105451 added to function.create-function | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-182581@lists.php.net to get a copy of this message | ||
TO: Dave H 24-Mar-2011 02:47
Thanks for your great function.
I made a little patch for it. Because if default parameter is array it makes error.
$val = $param->getDefaultValue();
if(is_string($val))
{
$val = "'$val'";
}
/* this is the patch */
elseif( is_array($val) )
{
$val = "array()";
}
/* _this is the patch */
$fproto .= ' = '.$val;
----
Server IP: 89.251.21.32
Probable Submitter: 81.90.233.238
----
Manual Page -- http://www.php.net/manual/en/function.create-function.php
Edit -- https://master.php.net/note/edit/105451
Del: integrated -- https://master.php.net/note/delete/105451/integrated
Del: useless -- https://master.php.net/note/delete/105451/useless
Del: bad code -- https://master.php.net/note/delete/105451/bad+code
Del: spam -- https://master.php.net/note/delete/105451/spam
Del: non-english -- https://master.php.net/note/delete/105451/non-english
Del: in docs -- https://master.php.net/note/delete/105451/in+docs
Del: other reasons-- https://master.php.net/note/delete/105451
Reject -- https://master.php.net/note/reject/105451
Search -- https://master.php.net/manage/user-notes.php